diff --git a/dinner.py b/dinner.py index 23f547c..b568754 100644 --- a/dinner.py +++ b/dinner.py @@ -106,7 +106,7 @@ def dinner_update(): return make_response(json.dumps(dict(code=0, data="OK"))) for key in value: value[key] = int(value[key]) / summary - set_user_menu(json.dumps(value)) + set_user_menu(json.dumps(value, ensure_ascii=False)) return make_response(json.dumps(dict(code=0, data="OK"))) @@ -145,8 +145,6 @@ def dinner(): summary = vote_reduce(fetch_user_menu_summary()) last_result = fetch_roll_result(-1) total_vote = sum(value for value in summary.values()) - if total_vote == 0: - total_vote = 1 result = fetch_roll_result() can_roll = (check_roll() == 1) all_choice = list(map(lambda x: {'name': x[0], 'label': x[1]}, fetch_all_menu())) diff --git a/templates/dinner.html b/templates/dinner.html index 096c19e..1bd9f26 100644 --- a/templates/dinner.html +++ b/templates/dinner.html @@ -46,7 +46,7 @@ {% endfor %} -