From 58c643d5bf8fd4ec00fd4f003dd325ede64c38fa Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 8 Feb 2020 09:29:34 +1000 Subject: [PATCH] fix rendering of question/answer column in browse screen --- pylib/anki/template.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pylib/anki/template.py b/pylib/anki/template.py index cfb5ae6d5..894058242 100644 --- a/pylib/anki/template.py +++ b/pylib/anki/template.py @@ -143,8 +143,13 @@ def render_card( def templates_for_card(card: Card, browser: bool) -> Tuple[str, str]: template = card.template() - q, a = browser and ("bqfmt", "bafmt") or ("qfmt", "afmt") - return template.get(q), template.get(a) # type: ignore + if browser: + q, a = template.get("bqfmt"), template.get("bafmt") + else: + q, a = None, None + q = q or template.get("qfmt") + a = a or template.get("afmt") + return q, a # type: ignore def fields_for_rendering(col: anki.storage._Collection, card: Card, note: Note):