diff --git a/aries_cloudagent/commands/default_version_upgrade_config.yml b/aries_cloudagent/commands/default_version_upgrade_config.yml index 666f57ee37..67b0b4a022 100644 --- a/aries_cloudagent/commands/default_version_upgrade_config.yml +++ b/aries_cloudagent/commands/default_version_upgrade_config.yml @@ -1,3 +1,8 @@ +v0.8.0: + resave_records: + base_record_path: + - "aries_cloudagent.connections.models.conn_record.ConnRecord" + update_existing_records: false v0.7.2: resave_records: base_record_path: diff --git a/aries_cloudagent/connections/models/conn_record.py b/aries_cloudagent/connections/models/conn_record.py index ca9e21b07f..5084f01039 100644 --- a/aries_cloudagent/connections/models/conn_record.py +++ b/aries_cloudagent/connections/models/conn_record.py @@ -174,6 +174,7 @@ def __eq__(self, other: Union[str, "ConnRecord.State"]) -> bool: "invitation_key", "their_public_did", "invitation_msg_id", + "state", "their_role", } @@ -322,11 +323,15 @@ async def retrieve_by_invitation_key( invitation_key: The key on the originating invitation initiator: Filter by the initiator value """ - tag_filter = {"invitation_key": invitation_key} + tag_filter = { + "invitation_key": invitation_key, + "state": cls.State.INVITATION.rfc160, + } post_filter = {"state": cls.State.INVITATION.rfc160} if their_role: post_filter["their_role"] = cls.Role.get(their_role).rfc160 + tag_filter["their_role"] = cls.Role.get(their_role).rfc160 return await cls.retrieve_by_tag_filter(session, tag_filter, post_filter)