Skip to content

Commit

Permalink
Fix potential issubclass crash
Browse files Browse the repository at this point in the history
  • Loading branch information
axnsan12 committed Jun 13, 2019
1 parent 2656696 commit 753be1a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drf_yasg/inspectors/field.py
Expand Up @@ -610,7 +610,7 @@ def field_to_swagger_object(self, field, swagger_object_type, use_references, **
# look for Python 3.5+ style type hinting of the return value
hint_class = inspect_signature(method).return_annotation

if not issubclass(hint_class, inspect._empty):
if inspect.isclass(hint_class) and not issubclass(hint_class, inspect._empty):
type_info = get_basic_type_info_from_hint(hint_class)

if type_info is not None:
Expand Down

0 comments on commit 753be1a

Please sign in to comment.