diff --git a/wanikaniburned.py b/wanikaniburned.py index be7432a..2f2696d 100644 --- a/wanikaniburned.py +++ b/wanikaniburned.py @@ -186,13 +186,13 @@ def show_quiz(): @login_required def get_items(): level_range = list(range(0, 61)) - if flask.request.args.get('level_range') is not '': + if flask.request.args.get('level_range') and flask.request.args.get('level_range') is not '': level_range = parse_range(flask.request.args.get('level_range')) item_state = ['burned'] - if flask.request.args.get('item_state') is not '': + if flask.request.args.get('item_state') and flask.request.args.get('item_state') is not '': item_state = flask.request.args.get('item_state').split(',') item_types = ['radical', 'kanji', 'vocab'] - if flask.request.args.get('item_types') is not '': + if flask.request.args.get('item_types') and flask.request.args.get('item_types') is not '': item_types = flask.request.args.get('item_types').split(',') return get_items_with_level_restriction(level_range, item_state, item_types)