diff --git a/aries_cloudagent/protocols/issue_credential/v1_0/manager.py b/aries_cloudagent/protocols/issue_credential/v1_0/manager.py index 2c55fa3c2f..d168168e71 100644 --- a/aries_cloudagent/protocols/issue_credential/v1_0/manager.py +++ b/aries_cloudagent/protocols/issue_credential/v1_0/manager.py @@ -904,13 +904,10 @@ async def receive_credential_ack( return cred_ex_record async def revoke_credentials( - self, - session: ProfileSession, - rev_reg_id: str, - cred_rev_ids: Sequence[str] + self, session: ProfileSession, rev_reg_id: str, cred_rev_ids: Sequence[str] ) -> None: """ - Update credentials state to credential_revoked + Update credentials state to credential_revoked. Args: rev_reg_id: revocation registry ID @@ -924,9 +921,7 @@ async def revoke_credentials( try: cred_ex_record = await ( V10CredentialExchange.retrieve_by_revocation( - session, - revoc_reg_id=rev_reg_id, - revocation_id=cred_rev_id + session, revoc_reg_id=rev_reg_id, revocation_id=cred_rev_id ) ) cred_ex_record.state = V10CredentialExchange.STATE_CREDENTIAL_REVOKED diff --git a/aries_cloudagent/protocols/issue_credential/v1_0/models/credential_exchange.py b/aries_cloudagent/protocols/issue_credential/v1_0/models/credential_exchange.py index b8dad6a751..c8618c3a61 100644 --- a/aries_cloudagent/protocols/issue_credential/v1_0/models/credential_exchange.py +++ b/aries_cloudagent/protocols/issue_credential/v1_0/models/credential_exchange.py @@ -37,7 +37,7 @@ class Meta: TAG_NAMES = { "~thread_id" if UNENCRYPTED_TAGS else "thread_id", "revoc_reg_id", - "revocation_id" + "revocation_id", } INITIATOR_SELF = "self" @@ -284,7 +284,7 @@ async def retrieve_by_connection_and_thread( async def retrieve_by_revocation( cls, session: ProfileSession, revoc_reg_id: str, revocation_id: str ) -> "V10CredentialExchange": - """Retrieve a credential exchange record by revocation registry ID and credential revocation ID.""" + """Retrieve a credential record by revocation registry and revocation ID.""" record = await cls.retrieve_by_tag_filter( session, {"revoc_reg_id": revoc_reg_id}, diff --git a/aries_cloudagent/revocation/manager.py b/aries_cloudagent/revocation/manager.py index e82cc8ff8d..178563e46d 100644 --- a/aries_cloudagent/revocation/manager.py +++ b/aries_cloudagent/revocation/manager.py @@ -19,6 +19,7 @@ CredentialManager as V10CredManager, ) + class RevocationManagerError(BaseError): """Revocation manager error."""