Skip to content

Commit

Permalink
Merge branch '5.12.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
lunkwill42 committed Dec 17, 2024
2 parents 1d50dee + 703563e commit c22a905
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions changelog.d/3258.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed module history view in device history
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 c22a905

Please sign in to comment.