Fixed is_spare issue
This commit is contained in:
parent
a0adc2bb53
commit
b2668eaff0
7
app.py
7
app.py
@ -134,6 +134,8 @@ def new_set(set_num):
|
|||||||
total_parts += len(response['results'])
|
total_parts += len(response['results'])
|
||||||
socketio.emit('update_progress', {'progress': int(count/total_parts*100)}, namespace='/progress')
|
socketio.emit('update_progress', {'progress': int(count/total_parts*100)}, namespace='/progress')
|
||||||
for i in response['results']:
|
for i in response['results']:
|
||||||
|
if i['is_spare']:
|
||||||
|
continue
|
||||||
# Get part image. Saved under ./static/parts/xxxx.jpg
|
# Get part image. Saved under ./static/parts/xxxx.jpg
|
||||||
part_img_url = i['part']['part_img_url']
|
part_img_url = i['part']['part_img_url']
|
||||||
part_img_url_id = 'nil'
|
part_img_url_id = 'nil'
|
||||||
@ -154,11 +156,6 @@ def new_set(set_num):
|
|||||||
print(str(e))
|
print(str(e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cursor.execute('''INSERT INTO inventory (
|
cursor.execute('''INSERT INTO inventory (
|
||||||
set_num,
|
set_num,
|
||||||
id,
|
id,
|
||||||
|
Loading…
Reference in New Issue
Block a user