Minor style tweak. [ci skip]

This commit is contained in:
Tom Christie 2016-07-27 15:39:46 +01:00
parent 46a870c002
commit 1acbc29d58

View File

@ -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()