mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 17:47:04 +03:00
Wrong error message on bad field lookup
This commit is contained in:
parent
5f3d09a052
commit
b95ef25cbb
|
@ -36,7 +36,7 @@ class ClassLookupDict(object):
|
|||
for cls in inspect.getmro(base_class):
|
||||
if cls in self.mapping:
|
||||
return self.mapping[cls]
|
||||
raise KeyError('Class %s not found in lookup.', cls.__name__)
|
||||
raise KeyError('Class %s not found in lookup.' % base_class.__name__)
|
||||
|
||||
def __setitem__(self, key, value):
|
||||
self.mapping[key] = value
|
||||
|
|
Loading…
Reference in New Issue
Block a user