Commit bc2c76a0 by Chris Carty

fixed issue on schemas.py where if model._meta.get_field(variable) failed…

fixed issue on schemas.py where if model._meta.get_field(variable) failed model_field was not set to None and would reult in an error
parent 544b4b99
...@@ -531,7 +531,7 @@ class SchemaGenerator(object): ...@@ -531,7 +531,7 @@ class SchemaGenerator(object):
try: try:
model_field = model._meta.get_field(variable) model_field = model._meta.get_field(variable)
except: except:
pass model_field = None # Set model_field to None so it doesn't fail test
if model_field is not None and model_field.verbose_name: if model_field is not None and model_field.verbose_name:
title = force_text(model_field.verbose_name) title = force_text(model_field.verbose_name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment