You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
by declaring something like queryset = SomeObj.objects.all().prefetch_related('many_object') in Generic Viewset
However this also cache when I patch the object and adding or removing that many_object
so I have to override patch method to called get_object() to refresh in order to get the updated return result
Duplicate of #2442. Not a lot we can do about this other than suitable documentation.
You could override get_queryset to only perform the prefetch on GET requests, perhaps?
I'm following #1964
by declaring something like
queryset = SomeObj.objects.all().prefetch_related('many_object')
in Generic ViewsetHowever this also cache when I patch the object and adding or removing that
many_object
so I have to override patch method to called
get_object()
to refresh in order to get the updated return resultAre there any method to separate this?
The text was updated successfully, but these errors were encountered: