From 16a8adc9f2e822ca52a2f4d25694fc1918a8a3a4 Mon Sep 17 00:00:00 2001 From: themylogin Date: Tue, 3 Dec 2024 14:45:08 +0100 Subject: [PATCH] Only call `get_task_extra_args` for cloud sync tasks (not for bucket list requests, etc.) (cherry picked from commit 777d5afd88d5dd73d6d2697ccc755b122db98459) --- src/middlewared/middlewared/plugins/cloud_sync.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/middlewared/middlewared/plugins/cloud_sync.py b/src/middlewared/middlewared/plugins/cloud_sync.py index 7e4cb81a5fd7c..0fe8c5ac30a88 100644 --- a/src/middlewared/middlewared/plugins/cloud_sync.py +++ b/src/middlewared/middlewared/plugins/cloud_sync.py @@ -76,9 +76,11 @@ async def __aenter__(self): config["pass"] = rclone_encrypt_password(config["pass"]) remote_path = None - extra_args = await self.provider.get_task_extra_args(self.cloud_sync) + extra_args = [] if "attributes" in self.cloud_sync: + extra_args = await self.provider.get_task_extra_args(self.cloud_sync) + config.update(dict(self.cloud_sync["attributes"], **await self.provider.get_task_extra(self.cloud_sync))) for k, v in list(config.items()): if v is undefined: