From c9fff5851fdd2929892e591034c04519ff57ca6a Mon Sep 17 00:00:00 2001 From: ff137 Date: Fri, 17 Nov 2023 12:27:42 +0200 Subject: [PATCH] :bug: fix wallet_update when only `extra_settings` requested Signed-off-by: ff137 --- aries_cloudagent/multitenant/admin/routes.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/aries_cloudagent/multitenant/admin/routes.py b/aries_cloudagent/multitenant/admin/routes.py index 6ae32f43a3..eb5f439eea 100644 --- a/aries_cloudagent/multitenant/admin/routes.py +++ b/aries_cloudagent/multitenant/admin/routes.py @@ -481,10 +481,17 @@ async def wallet_update(request: web.BaseRequest): wallet_dispatch_type = body.get("wallet_dispatch_type") label = body.get("label") image_url = body.get("image_url") - extra_settings = body.get("extra_settings") or {} + extra_settings = body.get("extra_settings") if all( - v is None for v in (wallet_webhook_urls, wallet_dispatch_type, label, image_url) + v is None + for v in ( + wallet_webhook_urls, + wallet_dispatch_type, + label, + image_url, + extra_settings, + ) ): raise web.HTTPBadRequest(reason="At least one parameter is required.") @@ -504,7 +511,7 @@ async def wallet_update(request: web.BaseRequest): settings["default_label"] = label if image_url is not None: settings["image_url"] = image_url - extra_subwallet_setting = get_extra_settings_dict_per_tenant(extra_settings) + extra_subwallet_setting = get_extra_settings_dict_per_tenant(extra_settings or {}) settings.update(extra_subwallet_setting) try: