diff --git a/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py b/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py index 6740dce76b..3435174712 100644 --- a/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py +++ b/aries_cloudagent/protocols/coordinate_mediation/v1_0/routes.py @@ -246,7 +246,8 @@ async def delete_mediation_request(request: web.BaseRequest): session, mediation_id ) result = mediation_record.serialize() - await mediation_record.delete_record(session) + async with context.profile.session() as session: + await mediation_record.delete_record(session) except StorageNotFoundError as err: raise web.HTTPNotFound(reason=err.roll_up) from err except (BaseModelError, StorageError) as err: