Prevent rewriting nested Block's data in filter_tagged_tasks (#68337)
This patch fixes the issue where nested Block copies were created from incorrect Block object. This resulted in nested Blocks data like ``name`` or ``_uuid`` to contain values from the Block the filter_tagged_tasks method was called on.
This commit is contained in:
parent
122743ae30
commit
cb389f6c31
2 changed files with 4 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- Prevent rewriting nested Block's data in filter_tagged_tasks
|
|
@ -379,7 +379,8 @@ class Block(Base, Conditional, CollectionSearch, Taggable):
|
|||
return tmp_list
|
||||
|
||||
def evaluate_block(block):
|
||||
new_block = self.copy(exclude_tasks=True)
|
||||
new_block = block.copy(exclude_parent=True, exclude_tasks=True)
|
||||
new_block._parent = block._parent
|
||||
new_block.block = evaluate_and_append_task(block.block)
|
||||
new_block.rescue = evaluate_and_append_task(block.rescue)
|
||||
new_block.always = evaluate_and_append_task(block.always)
|
||||
|
|
Loading…
Reference in a new issue