Skip to content

Commit

Permalink
Merge pull request #2612 from ff137/fix/update_wallet_w_extra_settings
Browse files Browse the repository at this point in the history
🐛 fix wallet_update when only `extra_settings` requested
  • Loading branch information
dbluhm authored Nov 17, 2023
2 parents b51d988 + c9fff58 commit 8a04943
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 8a04943

Please sign in to comment.