mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 12:47:11 -05:00
Fix: use HasField
This commit is contained in:
parent
fc8a2f9739
commit
112f951a13
1 changed files with 3 additions and 3 deletions
|
|
@ -690,10 +690,10 @@ def play_audio():
|
||||||
card = aqt.mw.col.get_card(CardId(req.cid))
|
card = aqt.mw.col.get_card(CardId(req.cid))
|
||||||
# TODO: Pass tags with next_card_data rather than rendering the card here.
|
# TODO: Pass tags with next_card_data rather than rendering the card here.
|
||||||
tags = card.answer_av_tags() if req.answer_side else card.question_av_tags()
|
tags = card.answer_av_tags() if req.answer_side else card.question_av_tags()
|
||||||
if req.index is None:
|
if req.HasField("index"):
|
||||||
play_tags(tags)
|
|
||||||
else:
|
|
||||||
play_tags([tags[req.index]])
|
play_tags([tags[req.index]])
|
||||||
|
else:
|
||||||
|
play_tags(tags)
|
||||||
|
|
||||||
|
|
||||||
post_handler_list = [
|
post_handler_list = [
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue