skip cancelled orders

This commit is contained in:
Johannes 2023-10-21 17:28:48 +02:00
parent d6310a2c78
commit a52204fba1

View file

@ -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