mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
#6732 - Fix test exception in Site form
This commit is contained in:
@ -175,6 +175,7 @@ class SiteForm(BootstrapMixin, TenancyForm, CustomFieldModelForm):
|
||||
def __init__(self, data=None, instance=None, *args, **kwargs):
|
||||
super().__init__(data=data, instance=instance, *args, **kwargs)
|
||||
|
||||
if self.instance and self.instance.pk is not None:
|
||||
self.fields['asns'].initial = self.instance.asns.all().values_list('id', flat=True)
|
||||
|
||||
# Hide the ASN field if there is nothing there as this is deprecated
|
||||
|
Reference in New Issue
Block a user