mirror of
https://github.com/ansible/awx.git
synced 2026-01-22 06:58:06 -03:30
Merge pull request #1435 from AlanCoding/dragon_riddle
Add relative location to CT schema errors
This commit is contained in:
commit
81234986b4
@ -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