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:
parent
ac82561226
commit
d8a338d020
1 changed files with 2 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue