mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
fix(community.docker.docker_volume): labels can be none (#702)
* fix(community.docker.docker_volume): labels can be none
catch case where volume labels can are done (default) eg:
$ docker volume inspect foo
[
{
"CreatedAt": "2023-11-11T12:55:23+01:00",
"Driver": "local",
"Labels": null,
"Mountpoint": "/var/lib/docker/volumes/foo/_data",
"Name": "foo",
"Options": {},
"Scope": "local"
}
]
* Update plugins/modules/docker_volume.py
Co-authored-by: Felix Fontein <felix@fontein.de>
* add(community.docker.docker_volume): changelog fragment
* Update changelogs/fragments/702-docker-volume-label-none.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
bugfixes:
|
||||
- docker_volume - fix crash caused by accessing an empty dictionary. The ``has_different_config()`` was raising an ``AttributeError`` because the ``self.existing_volume["Labels"]`` dictionary was ``None`` (https://github.com/ansible-collections/community.docker/pull/702).
|
||||
Reference in New Issue
Block a user