mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 13:00:12 +03:00
fix
This commit is contained in:
parent
88e995c310
commit
805283fe38
|
@ -577,8 +577,8 @@ class Field(object):
|
||||||
"""
|
"""
|
||||||
A helper method that simply raises a validation error.
|
A helper method that simply raises a validation error.
|
||||||
"""
|
"""
|
||||||
if hasattr(api_settings, 'global_error_messages'):
|
if 'GLOBAL_ERROR_MESSAGES' in api_settings.user_settings.keys():
|
||||||
self.error_messages.update(api_settings['global_error_messages'])
|
self.error_messages.update(api_settings.user_settings['GLOBAL_ERROR_MESSAGES'])
|
||||||
try:
|
try:
|
||||||
msg = self.error_messages[key]
|
msg = self.error_messages[key]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user