Handle None case

This commit is contained in:
Charles Cunningham 2020-05-28 09:17:49 -04:00
parent 37082a29bc
commit 863e0e4b9f

View File

@ -286,7 +286,8 @@ class AutoSchema(ViewInspector):
description = get_pk_description(model, model_field) description = get_pk_description(model, model_field)
if model_field is None and isinstance(model.__dict__[variable], property): 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 = { parameter = {
"name": variable, "name": variable,