diff options
| author | Nikolaus Schlemm | 2013-05-19 11:29:41 +0200 | 
|---|---|---|
| committer | Nikolaus Schlemm | 2013-05-19 11:29:41 +0200 | 
| commit | a91841f7fe91f79a18a1f4f0352ec3e07f389a0a (patch) | |
| tree | adc0f769905b5a0135b6d9cadace4f9ed387b870 /rest_framework | |
| parent | b915c1d4d81fc459ed7c79ee5264ef7467963c3f (diff) | |
| download | django-rest-framework-a91841f7fe91f79a18a1f4f0352ec3e07f389a0a.tar.bz2 | |
WORKAROUND: avoid errors like "AttributeError: 'APIRoot' object has no attribute 'get_serializer'"
Diffstat (limited to 'rest_framework')
| -rw-r--r-- | rest_framework/views.py | 2 | 
1 files changed, 2 insertions, 0 deletions
| diff --git a/rest_framework/views.py b/rest_framework/views.py index e8bd9f50..6348ca88 100644 --- a/rest_framework/views.py +++ b/rest_framework/views.py @@ -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 = {} | 
