mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -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
|
@ -39,7 +39,7 @@ class RoleMetadata(Base):
|
|||
'''
|
||||
|
||||
_allow_duplicates = FieldAttribute(isa='bool', default=False)
|
||||
_dependencies = FieldAttribute(isa='list', default=[])
|
||||
_dependencies = FieldAttribute(isa='list', default=list)
|
||||
_galaxy_info = FieldAttribute(isa='GalaxyInfo')
|
||||
|
||||
def __init__(self, owner=None):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue