mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-29 13:04:03 +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