diff --git a/api/views.py b/api/views.py index 5e27b2b..02a7e77 100644 --- a/api/views.py +++ b/api/views.py @@ -401,6 +401,7 @@ class NotificationViewSet(viewsets.ModelViewSet): def set_read(self, request, pk): notification = Notification.objects.filter(id=pk).first() notification.is_read = True + notification.save() serializer = NotificationSerializer(notification) @@ -410,6 +411,7 @@ class NotificationViewSet(viewsets.ModelViewSet): def set_unread(self, request, pk): notification = Notification.objects.filter(id=pk).first() notification.is_read = False + notification.save() serializer = NotificationSerializer(notification)