mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 23:44:00 -07:00
avoid persistent containers in attribute defaults
moved from the field attribute declaration and created a placeholder which then is resolved in the field attribute class. this is to avoid unwanted persistent of the defaults across objects which introduces stealth bugs when multiple objects of the same kind are used in succession while not overriding the default values.
This commit is contained in:
parent
0719eb3e2d
commit
87969868d4
9 changed files with 29 additions and 18 deletions
|
@ -64,7 +64,7 @@ class Task(Base, Conditional, Taggable, Become):
|
|||
# will be used if defined
|
||||
# might be possible to define others
|
||||
|
||||
_args = FieldAttribute(isa='dict', default=dict())
|
||||
_args = FieldAttribute(isa='dict', default='_ansible_container')
|
||||
_action = FieldAttribute(isa='string')
|
||||
|
||||
_any_errors_fatal = FieldAttribute(isa='bool')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue