From ee851d333cd49675488480be0501c8dbb14a23d8 Mon Sep 17 00:00:00 2001 From: Abhimanyu Saharan Date: Sat, 21 Jan 2023 13:15:12 +0530 Subject: [PATCH] fixed assignment too early issue --- netbox_acls/api/serializers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netbox_acls/api/serializers.py b/netbox_acls/api/serializers.py index e5dd7a2..d8eace7 100644 --- a/netbox_acls/api/serializers.py +++ b/netbox_acls/api/serializers.py @@ -200,6 +200,8 @@ class ACLInterfaceAssignmentSerializer(NetBoxModelSerializer): .get_object_for_this_type(id=data["assigned_object_id"]) .virtual_machine ) + else: + interface_host = None # Check that the associated interface's parent host has the selected ACL defined. if acl_host != interface_host: error_acl_not_assigned_to_host = (