mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 11:00:03 -03:30
add relative location to CT schema errors
This commit is contained in:
parent
60e3dfe22c
commit
fb43538333
@ -420,6 +420,10 @@ class JSONSchemaField(JSONBField):
|
||||
'{type} provided, expected {expected_type}'
|
||||
).format(path=list(error.path), type=type(error.instance).__name__,
|
||||
expected_type=expected_type)
|
||||
elif error.validator == 'additionalProperties' and hasattr(error, 'path'):
|
||||
error.message = _(
|
||||
'Schema validation error in relative path {path} ({error})'
|
||||
).format(path=list(error.path), error=error.message)
|
||||
errors.append(error)
|
||||
|
||||
if errors:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user