From bc2c76a000135a0a665aa7ffab5174ce6995b0a3 Mon Sep 17 00:00:00 2001 From: Chris Carty Date: Thu, 9 Mar 2017 21:11:52 -0500 Subject: [PATCH] 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 --- rest_framework/schemas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_framework/schemas.py b/rest_framework/schemas.py index 30e503b26..d74961813 100644 --- a/rest_framework/schemas.py +++ b/rest_framework/schemas.py @@ -531,7 +531,7 @@ class SchemaGenerator(object): try: model_field = model._meta.get_field(variable) 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: title = force_text(model_field.verbose_name)