|
@@ -143,7 +143,7 @@ def process_errors(errors, service_name=None):
|
|
|
if len(validator) >= 2:
|
|
|
first_type = anglicize_validator(validator[0])
|
|
|
last_type = anglicize_validator(validator[-1])
|
|
|
- types_from_validator = "{}{}".format(first_type, ", ".join(validator[1:-1]))
|
|
|
+ types_from_validator = "{}".format(", ".join([first_type] + validator[1:-1]))
|
|
|
|
|
|
msg = "{} or {}".format(
|
|
|
types_from_validator,
|
|
@@ -163,7 +163,6 @@ def process_errors(errors, service_name=None):
|
|
|
Inspecting the context value of a ValidationError gives us information about
|
|
|
which sub schema failed and which kind of error it is.
|
|
|
"""
|
|
|
-
|
|
|
required = [context for context in error.context if context.validator == 'required']
|
|
|
if required:
|
|
|
return required[0].message
|