diff --git a/rest_framework/schemas.py b/rest_framework/schemas.py index d74961813..ecfe835a9 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: - model_field = None # Set model_field to None so it doesn't fail test + model_field = None if model_field is not None and model_field.verbose_name: title = force_text(model_field.verbose_name)