Fixes #19465: Fix ability to clear assigned prefix scope in UI

This commit is contained in:
Jeremy Stretch 2025-05-13 10:33:27 -04:00
parent b57ceca2fd
commit 967e374d10

View File

@ -66,6 +66,10 @@ class ScopedForm(forms.Form):
if self.instance and scope_type_id != self.instance.scope_type_id:
self.initial['scope'] = None
else:
# Clear the initial scope value if scope_type is not set
self.initial['scope'] = None
class ScopedBulkEditForm(forms.Form):
scope_type = ContentTypeChoiceField(