Skip to content

Commit

Permalink
Merge pull request #2229 from lunkwill42/bugfix/eventengine-export-se…
Browse files Browse the repository at this point in the history
…rialization-error

[BUG] EventEngine alert export crashes on any alert from a device that is a member of a device group
  • Loading branch information
lunkwill42 committed Dec 4, 2020
2 parents 1b869b4 + 612b694 commit af470d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/nav/web/api/v1/alert_serializers.py
Expand Up @@ -136,7 +136,8 @@ def get_device_groups(obj):
"""Returns all the device groups for the netbox if any"""
try:
netbox = obj.netbox
return netbox.groups.values_list('id', flat=True) or None
values = netbox.groups.values_list('id', flat=True)
return list(values) if values else None
except Exception:
pass

Expand Down

0 comments on commit af470d9

Please sign in to comment.