Add serializer context to CategoryDetail (#6910)

This commit is contained in:
Oliver 2024-04-02 14:59:51 +11:00 committed by GitHub
parent 2570aff123
commit b93d0c587e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -267,6 +267,8 @@ class CategoryDetail(CategoryMixin, CustomRetrieveUpdateDestroyAPI):
except AttributeError:
pass
kwargs.setdefault('context', self.get_serializer_context())
return self.serializer_class(*args, **kwargs)
def update(self, request, *args, **kwargs):