Skip to content

Commit

Permalink
Fix a condition on lemma
Browse files Browse the repository at this point in the history
  • Loading branch information
PonteIneptique committed Sep 3, 2024
1 parent 775f7f4 commit f76e9a1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/models/corpus.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,7 +1117,11 @@ def is_valid(lemma, POS, morph, corpus):
"morph": True
}
allowed_column = corpus.displayed_columns_by_name
if lemma and "lemma" in allowed_column and allowed_lemma.count()>=0:
if (lemma # If we changed the lemma
and "lemma" in allowed_column # And if the lemma is a column known to the project
and allowed_lemma.count() # And if we have a list of accepted lemma,
):
# then we check for lemma validity
current_controlList = corpus.control_lists
regex_liste = []
if current_controlList:
Expand Down

0 comments on commit f76e9a1

Please sign in to comment.