lacre.repositories: Fix IdentityRepository existence predicate #133
|
@ -40,9 +40,7 @@ class IdentityRepository(KeyRing):
|
||||||
def _exists(self, email: str) -> bool:
|
def _exists(self, email: str) -> bool:
|
||||||
self._ensure_connected()
|
self._ensure_connected()
|
||||||
selq = select(self._identities.c.email).where(self._identities.c.email == email)
|
selq = select(self._identities.c.email).where(self._identities.c.email == email)
|
||||||
emails = [e for e in self._conn.execute(selq)]
|
return [e for e in self._conn.execute(selq)]
|
||||||
assert len(emails) == 1
|
|
||||||
return emails
|
|
||||||
|
|
||||||
def _insert(self, email, fprint):
|
def _insert(self, email, fprint):
|
||||||
self._ensure_connected()
|
self._ensure_connected()
|
||||||
|
|
Loading…
Reference in New Issue