From 2a11b0455c3dd320e57510d36ac3ecb02f0b49b6 Mon Sep 17 00:00:00 2001 From: jamshale Date: Thu, 11 Apr 2024 20:18:12 +0000 Subject: [PATCH] Prevent 500 error when re-promoting DID with endorsement Signed-off-by: jamshale --- aries_cloudagent/wallet/routes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aries_cloudagent/wallet/routes.py b/aries_cloudagent/wallet/routes.py index fd5d13b505..d3730254d4 100644 --- a/aries_cloudagent/wallet/routes.py +++ b/aries_cloudagent/wallet/routes.py @@ -757,8 +757,11 @@ async def wallet_set_public_did(request: web.BaseRequest): if not create_transaction_for_endorser: return web.json_response({"result": format_did_info(info)}) - else: + # DID is already posted to ledger + if not attrib_def: + return web.json_response({"result": format_did_info(info)}) + transaction_mgr = TransactionManager(context.profile) try: transaction = await transaction_mgr.create_record(