mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 11:33:59 +03:00
WORKAROUND: avoid errors like "AttributeError: 'APIRoot' object has no attribute 'get_serializer'"
This commit is contained in:
parent
b915c1d4d8
commit
a91841f7fe
|
@ -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 = {}
|
||||
|
|
Loading…
Reference in New Issue
Block a user