Skip to content

Commit bc2c76a

Browse files
committed
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
1 parent 544b4b9 commit bc2c76a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rest_framework/schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ def get_path_fields(self, path, method, view):
531531
try:
532532
model_field = model._meta.get_field(variable)
533533
except:
534-
pass
534+
model_field = None # Set model_field to None so it doesn't fail test
535535

536536
if model_field is not None and model_field.verbose_name:
537537
title = force_text(model_field.verbose_name)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy