lacre.repositories: Fix IdentityRepository existence predicate #133

Merged
pfm merged 1 commits from 132-fix-repo-upsert into main 2023-12-04 22:59:01 +01:00
1 changed files with 1 additions and 3 deletions

View File

@ -40,9 +40,7 @@ class IdentityRepository(KeyRing):
def _exists(self, email: str) -> bool:
self._ensure_connected()
selq = select(self._identities.c.email).where(self._identities.c.email == email)
emails = [e for e in self._conn.execute(selq)]
assert len(emails) == 1
return emails
return [e for e in self._conn.execute(selq)]
def _insert(self, email, fprint):
self._ensure_connected()