mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 16:40:03 +03:00
Handle None case
This commit is contained in:
parent
37082a29bc
commit
863e0e4b9f
|
@ -286,7 +286,8 @@ class AutoSchema(ViewInspector):
|
|||
description = get_pk_description(model, model_field)
|
||||
|
||||
if model_field is None and isinstance(model.__dict__[variable], property):
|
||||
description = getdoc(model.__dict__[variable])
|
||||
doc = getdoc(model.__dict__[variable])
|
||||
description = '' if doc is None else doc
|
||||
|
||||
parameter = {
|
||||
"name": variable,
|
||||
|
|
Loading…
Reference in New Issue
Block a user