From dacd6464329e80e5332e353443e6d94b02cce275 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 4dd73797bbf6..5ca4616c8b87 100644 --- a/src/middlewared/middlewared/plugins/cloud_sync.py +++ b/src/middlewared/middlewared/plugins/cloud_sync.py @@ -75,9 +75,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: