fix(action): register excludedParties/excludedRepresentatives as nested_fields
Root cause (live-verified, dev campaign 1384)
The two exclusion M2Ms were missing from ActionGroup.Meta.nested_fields, so djangoldp never registered their sub-container routes:
-
GET /actiongroups/1384/excludedRepresentatives/→ 406 / HTML fallback - same for
excludedParties/→ 406 / HTML - comparison:
specificTargetedRepresentatives/andcontactPlateforms/→ 200ldp:Container
The front cherry-picker (expand: true on both fields, risefor-front !81) had no container to expand through, and sib-core collapsed N=1 M2M values to the element itself — the exclusion filters silently never engaged on the action page (party exclusion !37 (merged) affected identically for N=1 campaigns).
Fix
One line: register excludedParties + excludedRepresentatives in nested_fields, same as their M2M siblings.
Verification (dev, post backend restart)
- Both sub-container routes return 200 with proper
ldp:Containerpayloads (N=1 included) - Parent payload ships both fields as containers (same shape as
specificTargetedRepresentatives) - List endpoint healthy (47 actions, inline containers, no size regression)
-
manage.py check: 81 issues = pre-existing baseline (W042 x76, W340 x4, W005 x1), zero new - End-to-end on the live dev page (CDP, cache-busted): postal filter drops the excluded rep on load (2188 → 2056, Simonnet absent);
excludedPartiesN=1 now arrives natively as an array
Notes
- No migration: Meta routing-only, no model-state change. Fork-safe (plain list extension of this package's own fields, no cross-package references).
- Companion front commit on risefor-front !81 (
b2c5e6f4) keeps thenormalizePartyRefsshape-hardening as a safety net:Representative-typed N=1 values still collapse in sib-core even with the route present (hypothesis: rdf-type known to the store), and payloads shipped before this backend change stay filtered.