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

This commit is contained in:
Nikolaus Schlemm 2013-05-19 11:29:41 +02:00
parent b915c1d4d8
commit a91841f7fe

View File

@ -80,6 +80,8 @@ class APIView(View):
self.check_permissions(cloned_request)
# TODO: find right placement - APIView does not have get_serializer
if not hasattr(self, 'get_serializer'):
continue
serializer = self.get_serializer()
if serializer is not None:
field_name_types = {}