Reset selected scope object when changing scope type

This commit is contained in:
Jeremy Stretch 2024-08-27 12:29:07 -04:00
parent b7306ac118
commit 9d1afbe336

View File

@ -612,6 +612,9 @@ class VLANGroupForm(NetBoxModelForm):
except ObjectDoesNotExist: except ObjectDoesNotExist:
pass pass
if self.instance and scope_type_id != self.instance.scope_type_id:
self.initial['scope'] = None
def clean(self): def clean(self):
super().clean() super().clean()