Skip to content

Commit

Permalink
Merge pull request #248 from sktston/feature/fix-duplicate-error
Browse files Browse the repository at this point in the history
Do not raise to handle temporal duplicate RECORD_TYPE_DID_DOC
  • Loading branch information
baegjae authored Feb 20, 2024
2 parents a668704 + 53f567c commit 73f4dd4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion aries_cloudagent/storage/askar.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Aries-Askar implementation of BaseStorage interface."""
import logging

from typing import Mapping, Sequence

Expand All @@ -21,6 +22,8 @@
)
from .record import StorageRecord

LOGGER = logging.getLogger(__name__)


class AskarStorage(BaseStorage):
"""Aries-Askar Non-Secrets interface."""
Expand Down Expand Up @@ -164,7 +167,9 @@ async def find_record(
except AskarError as err:
raise StorageError("Error when finding storage record") from err
if len(results) > 1:
raise StorageDuplicateError("Duplicate records found")
# SKT: Do not raise to handle temporal duplicate RECORD_TYPE_DID_DOC (will be removed by logic)
LOGGER.error("Duplicate records found - Use first record - type_filter: %s", type_filter)
# raise StorageDuplicateError("Duplicate records found")
if not results:
raise StorageNotFoundError("Record not found")
row = results[0]
Expand Down

0 comments on commit 73f4dd4

Please sign in to comment.