From 866674497aec69dbdabd2e8f3aeaa7c6c99d3e47 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sat, 27 Nov 2021 22:02:18 +0100 Subject: [PATCH] add filtering to list endpoint --- InvenTree/common/api.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/InvenTree/common/api.py b/InvenTree/common/api.py index 9d2ab49f41..d2852790de 100644 --- a/InvenTree/common/api.py +++ b/InvenTree/common/api.py @@ -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