mirror of
https://github.com/ankitects/anki.git
synced 2025-11-06 04:37:22 -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))
|
||||
# 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()
|
||||
if req.index is None:
|
||||
play_tags(tags)
|
||||
else:
|
||||
if req.HasField("index"):
|
||||
play_tags([tags[req.index]])
|
||||
else:
|
||||
play_tags(tags)
|
||||
|
||||
|
||||
post_handler_list = [
|
||||
|
|
|
|||
Loading…
Reference in a new issue