Previously, if there existed any notes in the target deck that didn't
have one of the hanzi fields, the get_hanzi step would fail as a
result of cleanup raising a ValueError if it received text=None.
This PR modifies the logic so that presence of a hanzi field is
verified before getting the hanzi itself.
It also modifies the behavior such that cards that do not have usages
filled are marked as failed. Otherwise, the user doesn't know why many
cards did not have usages filled.
Previously, if there existed any notes in the target deck that didn't have one of the hanzi fields, the
get_hanzi
step would fail as a result ofcleanup
raising aValueError
if it receivedtext=None
.This PR modifies the logic so that presence of a
hanzi
field is verified before getting thehanzi
itself.It also modifies the behavior such that cards that do not have usages filled are marked as failed. Otherwise, the user doesn't know why many cards did not have usages filled.
Relevant to #177.
Testing Strategy: All
unittest
tests pass