mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 21:30:22 -07:00
Fix parent attribute lookup
Using 'value is None' instead of 'not value', in order to account for boolean values which may be false Fixes #11232
This commit is contained in:
parent
256a323de5
commit
332ca927d9
2 changed files with 8 additions and 7 deletions
|
@ -297,13 +297,13 @@ class Task(Base, Conditional, Taggable, Become):
|
|||
Generic logic to get the attribute or parent attribute for a task value.
|
||||
'''
|
||||
value = self._attributes[attr]
|
||||
if self._block and (not value or extend):
|
||||
if self._block and (value is None or extend):
|
||||
parent_value = getattr(self._block, attr)
|
||||
if extend:
|
||||
value = self._extend_value(value, parent_value)
|
||||
else:
|
||||
value = parent_value
|
||||
if self._task_include and (not value or extend):
|
||||
if self._task_include and (value is None or extend):
|
||||
parent_value = getattr(self._task_include, attr)
|
||||
if extend:
|
||||
value = self._extend_value(value, parent_value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue