From 5a571b1c95942b61bb0cedc081db256e8cf68b3e Mon Sep 17 00:00:00 2001 From: Gorgsenegger Date: Tue, 16 Nov 2021 13:36:02 +0100 Subject: [PATCH] Fix TypeError When calling /schemas/{schema_id}/write_record, a server error 500 occurrs. The log output says TypeError: inject() got an unexpected keyword argument 'required' Signed-off-by: Gorgsenegger --- aries_cloudagent/messaging/schemas/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aries_cloudagent/messaging/schemas/routes.py b/aries_cloudagent/messaging/schemas/routes.py index 9e18970b28..03e99ea4bb 100644 --- a/aries_cloudagent/messaging/schemas/routes.py +++ b/aries_cloudagent/messaging/schemas/routes.py @@ -368,7 +368,7 @@ async def schemas_fix_schema_wallet_record(request: web.BaseRequest): schema_id = request.match_info["schema_id"] - ledger = context.inject(BaseLedger, required=False) + ledger = context.inject_or(BaseLedger) if not ledger: reason = "No ledger available" if not context.settings.get_value("wallet.type"):