Skip to content

Commit 9c17860

Browse files
Page editor no longer requires the single-map slug on tag pages
The wizard deliberately leaves TagPage.districtr_map_slug blank (the map_create_buttons block is the module surface now), but TagPageForm still forced required=True — so a wizard-created draft could not be saved or published in the page editor without picking a map it does not use. The field stays editable for legacy tag pages that carry it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 2ce9f0f commit 9c17860

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

cms/content/forms.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
public place page).
66
77
Team scoping (authapi/teams.py): a team-scoped member's choices are narrowed
8-
to their teams' maps, with at least one required — the choice set itself is
9-
the guard. Shared PlacePages (in scope on *any* overlap) may also carry other
8+
to their teams' maps — the choice set itself is the guard. Shared PlacePages (in scope on *any* overlap) may also carry other
109
teams' maps; those slugs are neither offered nor removable, and clean()
1110
re-inserts them at their original positions so saving never drops another
1211
team's association.
@@ -89,7 +88,10 @@ def __init__(self, *args, **kwargs):
8988
self.fields["districtr_map_slug"] = forms.ChoiceField(
9089
choices=[("", "---------")]
9190
+ _map_choices(limit_to=scoped, ensure=[current] if scoped is None else ()),
92-
required=True,
91+
# Optional: portals offer their modules through the page's
92+
# map_create_buttons block now (the wizard leaves this blank);
93+
# the field remains for legacy tag pages that still carry it.
94+
required=False,
9395
label=original.label,
9496
help_text=_SCOPED_HELP_TEXT if scoped is not None else original.help_text,
9597
)

0 commit comments

Comments
 (0)