skip cancelled orders
This commit is contained in:
parent
d6310a2c78
commit
a52204fba1
1 changed files with 2 additions and 0 deletions
2
parse.py
2
parse.py
|
@ -56,6 +56,8 @@ def parse(filename: Union[str, Path]) -> Tuple[
|
||||||
quest_answers = {id_: {} for id_ in questions}
|
quest_answers = {id_: {} for id_ in questions}
|
||||||
|
|
||||||
for order in data['orders']:
|
for order in data['orders']:
|
||||||
|
if order['status'] == 'c': # skip cancelled orders
|
||||||
|
continue
|
||||||
for position in order['positions']:
|
for position in order['positions']:
|
||||||
item_id = position['item']
|
item_id = position['item']
|
||||||
count_items[item_id] += 1
|
count_items[item_id] += 1
|
||||||
|
|
Loading…
Reference in a new issue