mirror of
https://github.com/ansible/awx.git
synced 2026-02-25 23:16:01 -03:30
unit tests of cred field types
This commit is contained in:
@@ -396,10 +396,16 @@ class JSONSchemaField(JSONBField):
|
||||
expected_type = error.validator_value
|
||||
if expected_type == 'object':
|
||||
expected_type = 'dict'
|
||||
error.message = _(
|
||||
'{type} provided in relative path {path}, expected {expected_type}'
|
||||
).format(path=list(error.path), type=type(error.instance).__name__,
|
||||
expected_type=expected_type)
|
||||
if error.path:
|
||||
error.message = _(
|
||||
'{type} provided in relative path {path}, expected {expected_type}'
|
||||
).format(path=list(error.path), type=type(error.instance).__name__,
|
||||
expected_type=expected_type)
|
||||
else:
|
||||
error.message = _(
|
||||
'{type} provided, expected {expected_type}'
|
||||
).format(path=list(error.path), type=type(error.instance).__name__,
|
||||
expected_type=expected_type)
|
||||
errors.append(error)
|
||||
|
||||
if errors:
|
||||
|
||||
Reference in New Issue
Block a user