Fixed incorrect vocabulary_count, wasn't accounting for the doubling of kanji items.
This commit is contained in:
parent
f743358355
commit
fb0f6d7ccd
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user