Commit f5772ad
authored
Enforce readonly name field for Test_Type instances and add dynamic serializer selection (#14090)
* Enforce readonly name field for existing Test_Type instances in form
* Add TestTypeCreateSerializer and enforce readonly name field in TestTypeSerializer
* Add dynamic serializer selection in TestTypesViewSet for create action
* Update test payload to set 'active' field instead of 'name'
* Update TestTypeTest payload to use 'name' and modify update_fields to 'active'
* Add test to verify 'name' field is read-only in TestType1 parent e797c5f commit f5772ad
4 files changed
Lines changed: 34 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1472 | 1472 | | |
1473 | 1473 | | |
1474 | 1474 | | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
1475 | 1482 | | |
1476 | | - | |
| 1483 | + | |
1477 | 1484 | | |
1478 | 1485 | | |
1479 | 1486 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2263 | 2263 | | |
2264 | 2264 | | |
2265 | 2265 | | |
| 2266 | + | |
| 2267 | + | |
| 2268 | + | |
| 2269 | + | |
| 2270 | + | |
2266 | 2271 | | |
2267 | 2272 | | |
2268 | 2273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
327 | 338 | | |
328 | 339 | | |
329 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3452 | 3452 | | |
3453 | 3453 | | |
3454 | 3454 | | |
3455 | | - | |
| 3455 | + | |
3456 | 3456 | | |
3457 | 3457 | | |
3458 | 3458 | | |
3459 | 3459 | | |
| 3460 | + | |
| 3461 | + | |
| 3462 | + | |
| 3463 | + | |
| 3464 | + | |
| 3465 | + | |
| 3466 | + | |
| 3467 | + | |
| 3468 | + | |
3460 | 3469 | | |
3461 | 3470 | | |
3462 | 3471 | | |
| |||
0 commit comments