Skip to content

Commit

Permalink
Merge pull request #1510 from baegjae/fix-get-credentials
Browse files Browse the repository at this point in the history
Fix bug when getting credentials on askar-profile
  • Loading branch information
ianco authored Nov 24, 2021
2 parents f52be0c + a2ed758 commit 2960c51
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions aries_cloudagent/indy/credx/holder.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,13 @@ async def get_credentials(self, start: int, count: int, wql: dict):
result = []

try:
rows = self._profile.store.scan(CATEGORY_CREDENTIAL, wql, start, count)
rows = self._profile.store.scan(
CATEGORY_CREDENTIAL,
wql,
start,
count,
self._profile.settings.get("wallet.askar_profile"),
)
async for row in rows:
cred = Credential.load(row.raw_value)
result.append(_make_cred_info(row.name, cred))
Expand Down Expand Up @@ -322,7 +328,11 @@ async def get_credentials_for_presentation_request_by_referent(
tag_filter = {"$and": [tag_filter, extra_query]}

rows = self._profile.store.scan(
CATEGORY_CREDENTIAL, tag_filter, start, count
CATEGORY_CREDENTIAL,
tag_filter,
start,
count,
self._profile.settings.get("wallet.askar_profile"),
)
async for row in rows:
if row.name in creds:
Expand Down

0 comments on commit 2960c51

Please sign in to comment.