[Update] 修改用户列表serializer

pull/3454/head
ibuler 2019-11-19 15:25:28 +08:00
parent 4c801bb828
commit e424315d93
1 changed files with 2 additions and 1 deletions

View File

@ -27,7 +27,8 @@ class IDSpmFilterMixin:
class SerializerMixin:
def get_serializer_class(self):
if self.request.query_params.get('draw') \
if self.request.method.lower() == 'get' and\
self.request.query_params.get('draw') \
and hasattr(self, 'serializer_display_class'):
return self.serializer_display_class
return super().get_serializer_class()