From b2668eaff06e6ac763993acab9e427804b09e833 Mon Sep 17 00:00:00 2001 From: FrederikBaerentsen Date: Fri, 19 Apr 2024 10:29:28 +0200 Subject: [PATCH] Fixed is_spare issue --- app.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index cfbf974..9e1d302 100644 --- a/app.py +++ b/app.py @@ -134,6 +134,8 @@ def new_set(set_num): total_parts += len(response['results']) socketio.emit('update_progress', {'progress': int(count/total_parts*100)}, namespace='/progress') for i in response['results']: + if i['is_spare']: + continue # Get part image. Saved under ./static/parts/xxxx.jpg part_img_url = i['part']['part_img_url'] part_img_url_id = 'nil' @@ -154,11 +156,6 @@ def new_set(set_num): print(str(e)) - - - - - cursor.execute('''INSERT INTO inventory ( set_num, id,