Skip to content

Commit

Permalink
Fix related modules in device history search
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Dec 17, 2024
1 parent 1d50dee commit 59c3f55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions python/nav/web/devicehistory/utils/history.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def make_selection_filter(and_mode=False):
'room__location',
'organization',
'category',
'module',
'modules',
'groups',
)
if selection[arg]
Expand Down Expand Up @@ -125,7 +125,7 @@ def make_selection_filter(and_mode=False):

# Find device ids that belongs to
# - selected devices
device = Device.objects.filter(modules__in=selection['module'])
device = Device.objects.filter(modules__in=selection['modules'])

# Find alert history that belongs to the netbox and device ids we found in
# the previous two queries.
Expand Down
2 changes: 1 addition & 1 deletion python/nav/web/devicehistory/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def devicehistory_view(request, **_):
'room': request.GET.getlist('room'),
'netbox': request.GET.getlist('netbox'),
'groups': request.GET.getlist('netboxgroup'),
'module': request.GET.getlist('module'),
'modules': request.GET.getlist('module'),
'mode': request.GET.getlist('mode'),
}

Expand Down

0 comments on commit 59c3f55

Please sign in to comment.