From fb0f6d7ccd02cf076c50efe30bf623408d08f107 Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Mon, 25 Jan 2016 21:45:09 +0000 Subject: [PATCH] Fixed incorrect vocabulary_count, wasn't accounting for the doubling of kanji items. --- wanikaniburned.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wanikaniburned.py b/wanikaniburned.py index fe7190e..5a58059 100644 --- a/wanikaniburned.py +++ b/wanikaniburned.py @@ -141,7 +141,7 @@ def get_items_with_level_restriction(level_range, item_state, item_types): 'answer_type': 'kana'}, {'item_type': 'vocabulary', 'question': item['character'], 'answer': item['meaning'], 'answer_type': 'eng'}]) - vocabulary_count = int((len(items) - (radical_count + kanji_count)) / 2) + vocabulary_count = int((len(items) - (radical_count + (kanji_count * 2))) / 2) if not items: return flask.jsonify(error="No items within these filter parameters") else: