Skip to content

Commit

Permalink
🐛 fix wallet_update when only extra_settings requested
Browse files Browse the repository at this point in the history
Signed-off-by: ff137 <[email protected]>
  • Loading branch information
ff137 committed Nov 17, 2023
1 parent b51d988 commit c9fff58
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions aries_cloudagent/multitenant/admin/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand All @@ -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:
Expand Down

0 comments on commit c9fff58

Please sign in to comment.