2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-30 12:36:45 +00:00

add filtering to list endpoint

This commit is contained in:
Matthias 2021-11-27 22:02:18 +01:00
parent f2d0b06881
commit 866674497a
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -152,6 +152,11 @@ class NotificationList(generics.ListAPIView):
'message',
]
filter_fields = [
'category',
'read',
]
def filter_queryset(self, queryset):
"""
Only list notifications which apply to the current user