lacre.repositories: Fix IdentityRepository existence predicate

This commit is contained in:
Piotr F. Mieszkowski 2023-12-04 22:57:43 +01:00
parent b7713207ab
commit 0d852bc279
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()