Compare commits
1 Commits
e478cae165
...
ed34d22825
Author | SHA1 | Date |
---|---|---|
Nikolai | ed34d22825 |
|
@ -2,7 +2,6 @@
|
||||||
Membership query interface
|
Membership query interface
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from _pytest.python_api import raises
|
|
||||||
from sqlalchemy import select, func
|
from sqlalchemy import select, func
|
||||||
|
|
||||||
from amanuensis.db import DbContext, Membership
|
from amanuensis.db import DbContext, Membership
|
||||||
|
@ -42,8 +41,7 @@ def create(
|
||||||
lex: Lexicon = db(
|
lex: Lexicon = db(
|
||||||
select(Lexicon).where(Lexicon.id == lexicon_id)
|
select(Lexicon).where(Lexicon.id == lexicon_id)
|
||||||
).scalar_one_or_none()
|
).scalar_one_or_none()
|
||||||
if not lex:
|
assert lex, "could not find lexicon"
|
||||||
raise ArgumentError("could not find lexicon")
|
|
||||||
|
|
||||||
# Verify lexicon is joinable
|
# Verify lexicon is joinable
|
||||||
if not lex.joinable:
|
if not lex.joinable:
|
||||||
|
|
Loading…
Reference in New Issue