diff --git a/netbox_acls/forms/models.py b/netbox_acls/forms/models.py index 256b506..104a889 100644 --- a/netbox_acls/forms/models.py +++ b/netbox_acls/forms/models.py @@ -513,14 +513,13 @@ def _check_if_interface_already_has_acl_in_direction( direction=direction, ).exists(): return {} - else: - error_interface_already_assigned = ( - "Interfaces can only have 1 Access List assigned in each direction." - ) - return { - "direction": [error_interface_already_assigned], - assigned_object_type: [error_interface_already_assigned], - } + error_interface_already_assigned = ( + "Interfaces can only have 1 Access List assigned in each direction." + ) + return { + "direction": [error_interface_already_assigned], + assigned_object_type: [error_interface_already_assigned], + } def save(self, *args, **kwargs): """