Merge pull request 'lacre.repositories: Fix IdentityRepository existence predicate' (#133) from 132-fix-repo-upsert into main
Reviewed-on: #133
This commit is contained in:
commit
4c603839b5
1 changed files with 1 additions and 3 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue