Skip to content

Commit

Permalink
Hotfix for issue #1198
Browse files Browse the repository at this point in the history
  • Loading branch information
fbanados committed Oct 8, 2024
1 parent 5440fda commit 6eb55fe
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions src/CreeDictionary/API/search/presentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -506,16 +506,20 @@ def get_lexical_info(
entries.append(entry)
url = "search?q=" + preverb_text
_type = "Preverb"
id: Optional[int] = entries[0]["id"]
result = _LexicalEntry(
entry=cast(Any, entries),
text=preverb_text,
url=url,
id=id,
type=_type,
original_tag=tag,
)
lexical_info.append(result)
try:
id: Optional[int] = entries[0]["id"]
result = _LexicalEntry(
entry=cast(Any, entries),
text=preverb_text,
url=url,
id=id,
type=_type,
original_tag=tag,
)
lexical_info.append(result)
except IndexError:
# Pretend we didn't find it.
preverb_result1 = Wordform(text=preverb_text, is_lemma=True)
else:
# Can't find a match for the preverb in the database.
# This happens when searching against the test database for
Expand Down

0 comments on commit 6eb55fe

Please sign in to comment.