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

This commit is contained in:
Jeremy Stretch
2025-05-13 11:21:06 -04:00
committed by GitHub
parent f6a85775d7
commit 59dce87ba0

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(