Finish support for multiple answers polls
This commit is contained in:
parent
c125891681
commit
49ffe3ab75
7 changed files with 67 additions and 38 deletions
|
@ -206,6 +206,11 @@ def get_actor(url):
|
|||
return f"Error<{url}/{exc!r}>"
|
||||
|
||||
|
||||
@filters.app_template_filter()
|
||||
def poll_answer_key(choice: str) -> str:
|
||||
return _answer_key(choice)
|
||||
|
||||
|
||||
@filters.app_template_filter()
|
||||
def get_answer_count(choice, obj, meta):
|
||||
count_from_meta = meta.get("question_answers", {}).get(_answer_key(choice), 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue