Compare commits
1 Commits
ed34d22825
...
3555558bd9
Author | SHA1 | Date |
---|---|---|
Nikolai | 3555558bd9 |
|
@ -41,14 +41,13 @@ def create(
|
|||
lex: Lexicon = db(
|
||||
select(Lexicon).where(Lexicon.id == lexicon_id)
|
||||
).scalar_one_or_none()
|
||||
assert lex, "could not find lexicon"
|
||||
|
||||
# Verify lexicon is joinable
|
||||
# Verify lexicon is joinable; current no Lexicons are joinable so this is commented out
|
||||
if not lex.joinable:
|
||||
raise ArgumentError("Can't join: Lexicon is not joinable")
|
||||
|
||||
# Verify lexicon is not full
|
||||
if lex.player_limit is not None:
|
||||
if lex.player_limit:
|
||||
if (
|
||||
db(select(func.count()).where(Membership.lexicon_id == lexicon_id)).scalar()
|
||||
>= lex.player_limit
|
||||
|
|
Loading…
Reference in New Issue