giellatekno / neahttadigisanit

Saami dictionary webapp
Other
2 stars 2 forks source link

Analyzes which contain an empty lemma causes a crash #13

Closed trondtynnol closed 4 months ago

trondtynnol commented 7 months ago

When searching for a word which contains an empty lemma with only tags as one of its analyzes, NDS returns a 500 Internal Server Error.

Example: Search for "yksitoista" in https://saan.oahpa.no/fin/sms (One of the analyses of "yksitoista" is yksi+Num+Sg+Nom#+Cmp#toinen+N+Sg+Par containing the empty lemma +Cmp)

NDS should be robust against these kinds of analyses.

Note: Sometimes the internal lemma in NDS is supposed to be None, like the intermediate steps when having searched "hverandre" at https://sanit.oahpa.no/nob/sme.

Phaqui commented 6 months ago

For reference, this looks similar to #9 (which was marked as fixed as of 9a4b26fbe2d788904dd70a4e138eb08f66002c25). Maybe also check explicitly for None, in addition to the empty string?

trondtynnol commented 6 months ago

You are right, this is a duplicate of #9 . But unfortunately I had to undo 9a4b26fbe2d788904dd70a4e138eb08f66002c25 in f97c14c1bc130d539e8fd70ec13991563e6d0b77, as it broke the "hverandre" functionality (it was never deployed).

Phaqui commented 4 months ago

Fixed as of 54946ce860511f37b0a2a0d15089dc9caaaa83b4 (I hope!)