Commit bd3e6a4
Extract authoring-user-field enforcement into a shared helper
Move the repeated "require an author FK, allow null only during
deserialization, and drop references to a cross-dataset superuser" logic
out of the course models and into
AbstractFacilityDataModel.enforce_authoring_user_field, routing
CourseSession, CourseSessionAssignment and UnitTestAssignment through it.
No behaviour change: enforcement still happens on every non-deserialization
save, matching the semantics established in #14130.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent d02d3b9 commit bd3e6a4
2 files changed
Lines changed: 39 additions & 44 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
400 | 436 | | |
401 | 437 | | |
402 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
335 | | - | |
336 | | - | |
337 | | - | |
| 324 | + | |
338 | 325 | | |
339 | 326 | | |
340 | 327 | | |
| |||
427 | 414 | | |
428 | 415 | | |
429 | 416 | | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
| 417 | + | |
446 | 418 | | |
447 | 419 | | |
448 | 420 | | |
| |||
614 | 586 | | |
615 | 587 | | |
616 | 588 | | |
617 | | - | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
624 | | - | |
625 | | - | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 589 | + | |
631 | 590 | | |
632 | 591 | | |
633 | 592 | | |
| |||
0 commit comments