mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 22:51:23 -07:00
Fix bug in f310d13
(v2)
This commit is contained in:
parent
a87d889182
commit
6a44056d76
1 changed files with 2 additions and 2 deletions
|
@ -260,7 +260,7 @@ class Base:
|
||||||
# run the post-validator if present
|
# run the post-validator if present
|
||||||
method = getattr(self, '_post_validate_%s' % name, None)
|
method = getattr(self, '_post_validate_%s' % name, None)
|
||||||
if method:
|
if method:
|
||||||
value = method(attribute, value, all_vars, fail_on_undefined)
|
value = method(attribute, value, all_vars, templar._fail_on_undefined_errors)
|
||||||
else:
|
else:
|
||||||
# otherwise, just make sure the attribute is of the type it should be
|
# otherwise, just make sure the attribute is of the type it should be
|
||||||
if attribute.isa == 'string':
|
if attribute.isa == 'string':
|
||||||
|
@ -281,7 +281,7 @@ class Base:
|
||||||
except (TypeError, ValueError) as e:
|
except (TypeError, ValueError) as e:
|
||||||
raise AnsibleParserError("the field '%s' has an invalid value (%s), and could not be converted to an %s. Error was: %s" % (name, value, attribute.isa, e), obj=self.get_ds())
|
raise AnsibleParserError("the field '%s' has an invalid value (%s), and could not be converted to an %s. Error was: %s" % (name, value, attribute.isa, e), obj=self.get_ds())
|
||||||
except UndefinedError as e:
|
except UndefinedError as e:
|
||||||
if fail_on_undefined:
|
if templar._fail_on_undefined_errors:
|
||||||
raise AnsibleParserError("the field '%s' has an invalid value, which appears to include a variable that is undefined. The error was: %s" % (name,e), obj=self.get_ds())
|
raise AnsibleParserError("the field '%s' has an invalid value, which appears to include a variable that is undefined. The error was: %s" % (name,e), obj=self.get_ds())
|
||||||
|
|
||||||
def serialize(self):
|
def serialize(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue