Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 67 (Sourcery refactored) #128

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions netbox_acls/forms/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
}
Comment on lines -516 to +522
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function ACLInterfaceAssignmentForm._check_if_interface_already_has_acl_in_direction refactored with the following changes:


def save(self, *args, **kwargs):
"""
Expand Down