Skip to content

Commit

Permalink
Change lookups according to renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Jan 11, 2023
1 parent 0daa852 commit 3f78b99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/nav/web/ipdevinfo/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ def port_details(request, netbox_sysname, port_type=None, port_id=None, port_nam
# If interface is detained in Arnold, this should be visible on the
# port details view
try:
detention = port.identities.get(status__in=['quarantined', 'disabled'])
detention = port.arnold_identities.get(status__in=['quarantined', 'disabled'])
except Identity.DoesNotExist:
detention = None

Expand Down
4 changes: 2 additions & 2 deletions python/nav/web/portadmin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,10 @@ def mark_detained_interfaces(interfaces):
# If interface is administratively down, check if Arnold is the source
if (
interface.ifadminstatus == 2
and interface.identities.filter(status='disabled').count() > 0
and interface.arnold_identities.filter(status='disabled').count() > 0
):
interface.detained = True
if interface.identities.filter(status='quarantined').count() > 0:
if interface.arnold_identities.filter(status='quarantined').count() > 0:
interface.detained = True


Expand Down

0 comments on commit 3f78b99

Please sign in to comment.