Skip to content

Commit

Permalink
Add status filter for surge-alert
Browse files Browse the repository at this point in the history
  • Loading branch information
k9845 committed Feb 12, 2024
1 parent d183164 commit 5bd94a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions notifications/drf_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class SurgeAlertFilter(filters.FilterSet):
help_text='Molnix_tag names, comma separated',
widget=CSVWidget,
)
status = filters.NumberFilter(field_name='status', lookup_expr='exact')

class Meta:
model = SurgeAlert
Expand Down
4 changes: 2 additions & 2 deletions notifications/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class SurgeAlertSerializer(ModelSerializer):
class Meta:
model = SurgeAlert
fields = (
'operation', 'country', 'message', 'deployment_needed', 'is_private', 'event', 'created_at', 'id',
'operation','country', 'message', 'deployment_needed', 'is_private', 'event', 'created_at', 'id',
'atype', 'atype_display', 'category', 'category_display', 'molnix_id', 'molnix_tags',
'molnix_status', 'opens', 'closes', 'start', 'end', 'is_active', 'is_stood_down','status_display'
'molnix_status', 'opens', 'closes', 'start', 'end', 'is_active', 'is_stood_down','status', 'status_display'
)


Expand Down

0 comments on commit 5bd94a8

Please sign in to comment.