mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-21 11:08:44 -06:00
Fixes #19659: Populate initial device/VM selection for 'add a service' button
This commit is contained in:
@@ -826,7 +826,7 @@ class ServiceForm(NetBoxModelForm):
|
||||
except ObjectDoesNotExist:
|
||||
pass
|
||||
|
||||
if self.instance and parent_object_type_id != self.instance.parent_object_type_id:
|
||||
if self.instance and self.instance.pk and parent_object_type_id != self.instance.parent_object_type_id:
|
||||
self.initial['parent'] = None
|
||||
|
||||
def clean(self):
|
||||
|
||||
Reference in New Issue
Block a user