mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
Minor style tweak. [ci skip]
This commit is contained in:
parent
46a870c002
commit
1acbc29d58
|
@ -251,11 +251,11 @@ class SchemaGenerator(object):
|
||||||
if method not in ('PUT', 'PATCH', 'POST'):
|
if method not in ('PUT', 'PATCH', 'POST'):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
fields = []
|
if not hasattr(view, 'get_serializer_class'):
|
||||||
|
|
||||||
if not (hasattr(view, 'get_serializer_class') and callable(getattr(view, 'get_serializer_class'))):
|
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
fields = []
|
||||||
|
|
||||||
serializer_class = view.get_serializer_class()
|
serializer_class = view.get_serializer_class()
|
||||||
serializer = serializer_class()
|
serializer = serializer_class()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user