Skip to content

Commit

Permalink
fix mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
koenvanderveen committed Jun 22, 2024
1 parent 61333d1 commit 32d7dfc
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/syft/src/syft/store/mongo_document_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,21 @@ def data(self) -> dict:
values: list = self._all(credentials=None, has_permission=True).ok()
return {v.id: v for v in values}

def _get(
self,
uid: UID,
credentials: SyftVerifyKey,
has_permission: bool | None = False,
) -> Result[SyftObject, str]:
qks = QueryKeys.from_dict({"id": uid})
res = self._get_all_from_store(
credentials, qks, order_by=None, has_permission=has_permission
)
if res.is_err():
return res
else:
return Ok(res.ok()[0])

def _get_all_from_store(
self,
credentials: SyftVerifyKey,
Expand Down

0 comments on commit 32d7dfc

Please sign in to comment.