mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-01 13:59:09 -07:00
Do not use mutable defaults in FieldAttribute, instead allow supplying a callable for defaults of mutable types. Fixes #46824 (#46833)
This commit is contained in:
parent
0dd17b521f
commit
a06a5ded61
14 changed files with 57 additions and 37 deletions
|
@ -35,7 +35,7 @@ from ansible.template import Templar
|
|||
class PlaybookInclude(Base, Conditional, Taggable):
|
||||
|
||||
_import_playbook = FieldAttribute(isa='string')
|
||||
_vars = FieldAttribute(isa='dict', default=dict())
|
||||
_vars = FieldAttribute(isa='dict', default=dict)
|
||||
|
||||
@staticmethod
|
||||
def load(data, basedir, variable_manager=None, loader=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue