Skip to content
Snippets Groups Projects
Commit 1a4077cf authored by Calum Mackervoy's avatar Calum Mackervoy Committed by Jean-Baptiste Pasquier
Browse files

bugfix: clearing user cache on Notification update

parent 6db04e6e
No related branches found
No related tags found
No related merge requests found
from djangoldp.serializers import LDPSerializer
from djangoldp.views import LDPViewSet
from djangoldp.pagination import LDPPagination
......@@ -10,3 +11,10 @@ class LDPNotificationsViewSet(LDPViewSet):
'''overridden LDPViewSet to force pagination'''
pagination_class = LDPNotificationsPagination
depth = 0
def update(self, request, *args, **kwargs):
instance = self.get_object()
LDPSerializer.to_representation_cache.invalidate(instance.user.urlid)
return super().update(request, *args, **kwargs)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment