Currently, when reviewing a note with a non-AnkiHub note type, this error occurs:
File "ankihub/gui/reviewer.py", line 126, in _add_ankihub_ai_js_to_reviewer_web_content
ah_dids = {ah_did_of_note, ah_did_of_deck, *ah_dids_of_note_type} - {None}
TypeError: 'NoneType' object is not iterable
The reason is that the ankihub_dids_for_note_type function can return None.
To fix this, we can make it return an empty set instead of None when there are no AnkiHub deck ids for the note type.
Related issues
Proposed changes
Return an empty set from the ankihub_dids_for_note_type function if there are no results instead of None
Currently, when reviewing a note with a non-AnkiHub note type, this error occurs:
The reason is that the
ankihub_dids_for_note_type
function can returnNone
.To fix this, we can make it return an empty set instead of
None
when there are no AnkiHub deck ids for the note type.Related issues
Proposed changes
ankihub_dids_for_note_type
function if there are no results instead ofNone