From d8a338d0209640ae949190a867e200d889812618 Mon Sep 17 00:00:00 2001 From: "Jonas L." Date: Wed, 10 Dec 2025 11:15:39 +0100 Subject: [PATCH] Apply suggestion from @apricote MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Julian Tölle --- plugins/modules/storage_box_subaccount.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/modules/storage_box_subaccount.py b/plugins/modules/storage_box_subaccount.py index 6d55c10..427261c 100644 --- a/plugins/modules/storage_box_subaccount.py +++ b/plugins/modules/storage_box_subaccount.py @@ -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