forked from FrederikBaerentsen/BrickTracker
Fixed a bug where it was already index 0 that was popped from the missing bricks list
This commit is contained in:
2
app.py
2
app.py
@@ -58,7 +58,7 @@ def save_number(tmp):
|
||||
elif number == '0':
|
||||
for idx,i in enumerate(json_file['unit'][int(index)]['bricks']['missing']):
|
||||
if i['brick']['ID'] == part_num and i['brick']['is_spare'] == is_spare and i['brick']['color_name'] == color:
|
||||
json_file['unit'][int(index)]['bricks']['missing'].pop(0)
|
||||
json_file['unit'][int(index)]['bricks']['missing'].pop(idx)
|
||||
else:
|
||||
found = False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user