mirror of
https://github.com/etesync/server
synced 2024-12-27 09:48:24 +00:00
prefetch: fix handling of the prefetch param.
This commit is contained in:
parent
e385aa8f20
commit
a613a32628
@ -190,7 +190,7 @@ class CollectionViewSet(BaseViewSet):
|
||||
|
||||
def get_serializer_context(self):
|
||||
context = super().get_serializer_context()
|
||||
prefetch = self.request.query_params.get('prefetch', True)
|
||||
prefetch = self.request.query_params.get('prefetch', 'true') != 'false'
|
||||
context.update({'request': self.request, 'prefetch': prefetch})
|
||||
return context
|
||||
|
||||
@ -256,7 +256,7 @@ class CollectionItemViewSet(BaseViewSet):
|
||||
|
||||
def get_serializer_context(self):
|
||||
context = super().get_serializer_context()
|
||||
prefetch = self.request.query_params.get('prefetch', True)
|
||||
prefetch = self.request.query_params.get('prefetch', 'true') != 'false'
|
||||
context.update({'request': self.request, 'prefetch': prefetch})
|
||||
return context
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user