mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-25 19:14:01 +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'):
|
||||
return []
|
||||
|
||||
fields = []
|
||||
|
||||
if not (hasattr(view, 'get_serializer_class') and callable(getattr(view, 'get_serializer_class'))):
|
||||
if not hasattr(view, 'get_serializer_class'):
|
||||
return []
|
||||
|
||||
fields = []
|
||||
|
||||
serializer_class = view.get_serializer_class()
|
||||
serializer = serializer_class()
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user