diff --git a/changelog.d/3258.fixed.md b/changelog.d/3258.fixed.md new file mode 100644 index 0000000000..ac49922b89 --- /dev/null +++ b/changelog.d/3258.fixed.md @@ -0,0 +1 @@ +Fixed module history view in device history diff --git a/python/nav/web/devicehistory/utils/history.py b/python/nav/web/devicehistory/utils/history.py index 989477e78c..13a95feb08 100644 --- a/python/nav/web/devicehistory/utils/history.py +++ b/python/nav/web/devicehistory/utils/history.py @@ -90,7 +90,7 @@ def make_selection_filter(and_mode=False): 'room__location', 'organization', 'category', - 'module', + 'modules', 'groups', ) if selection[arg] @@ -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. diff --git a/python/nav/web/devicehistory/views.py b/python/nav/web/devicehistory/views.py index 1641308440..cb5f283f2e 100644 --- a/python/nav/web/devicehistory/views.py +++ b/python/nav/web/devicehistory/views.py @@ -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'), }