This commit is contained in:
shuma 2017-08-02 10:35:05 +04:00
parent 88e995c310
commit 805283fe38

View File

@ -577,8 +577,8 @@ class Field(object):
"""
A helper method that simply raises a validation error.
"""
if hasattr(api_settings, 'global_error_messages'):
self.error_messages.update(api_settings['global_error_messages'])
if 'GLOBAL_ERROR_MESSAGES' in api_settings.user_settings.keys():
self.error_messages.update(api_settings.user_settings['GLOBAL_ERROR_MESSAGES'])
try:
msg = self.error_messages[key]
except KeyError: