Commit a91841f7 by Nikolaus Schlemm

WORKAROUND: avoid errors like "AttributeError: 'APIRoot' object has no attribute 'get_serializer'"

parent b915c1d4
...@@ -80,6 +80,8 @@ class APIView(View): ...@@ -80,6 +80,8 @@ class APIView(View):
self.check_permissions(cloned_request) self.check_permissions(cloned_request)
# TODO: find right placement - APIView does not have get_serializer # TODO: find right placement - APIView does not have get_serializer
if not hasattr(self, 'get_serializer'):
continue
serializer = self.get_serializer() serializer = self.get_serializer()
if serializer is not None: if serializer is not None:
field_name_types = {} field_name_types = {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment