1
0
Fork 0
mirror of https://github.com/ansible-collections/hetzner.hcloud.git synced 2026-02-04 08:01:49 +00:00

Apply suggestion from @apricote

Co-authored-by: Julian Tölle <julian.toelle@hetzner-cloud.de>
This commit is contained in:
Jonas L. 2025-12-10 11:15:39 +01:00 committed by GitHub
parent ac82561226
commit d8a338d020
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -333,11 +333,9 @@ class AnsibleStorageBoxSubaccount(AnsibleHCloud):
if (value := self.module.params.get("name")) is not None:
if value != self.storage_box_subaccount_name:
self.fail_on_invalid_params(required=["id"])
if "labels" in params:
params["labels"][NAME_LABEL_KEY] = value
else:
if "labels" not in params:
params["labels"] = self.storage_box_subaccount.labels
params["labels"][NAME_LABEL_KEY] = value
params["labels"][NAME_LABEL_KEY] = value
self._mark_as_changed()
# Update only if params holds changes or the data must be refreshed (actions