Skip to content

Commit ee851d3

Browse files
committed
fixed assignment too early issue
1 parent 7fc3367 commit ee851d3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

netbox_acls/api/serializers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ def validate(self, data):
200200
.get_object_for_this_type(id=data["assigned_object_id"])
201201
.virtual_machine
202202
)
203+
else:
204+
interface_host = None
203205
# Check that the associated interface's parent host has the selected ACL defined.
204206
if acl_host != interface_host:
205207
error_acl_not_assigned_to_host = (

0 commit comments

Comments
 (0)