From ca7d7dfd1287447f3215cf78e05277ae3b373882 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Thu, 16 Apr 2020 11:35:58 +0300 Subject: [PATCH] Allow passing inline to not only GET requests. --- django_etesync/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django_etesync/views.py b/django_etesync/views.py index c4c8479..6c2faf3 100644 --- a/django_etesync/views.py +++ b/django_etesync/views.py @@ -67,7 +67,7 @@ class CollectionViewSet(BaseViewSet): def get_serializer_context(self): context = super().get_serializer_context() - inline = self.request.method == 'GET' and 'inline' in self.request.query_params + inline = 'inline' in self.request.query_params context.update({'request': self.request, 'inline': inline}) return context @@ -118,7 +118,7 @@ class CollectionItemViewSet(BaseViewSet): def get_serializer_context(self): context = super().get_serializer_context() - inline = self.request.method == 'GET' and 'inline' in self.request.query_params + inline = 'inline' in self.request.query_params context.update({'request': self.request, 'inline': inline}) return context