Fix: Removed that when there was nothign in order no commit add woud be done.

This commit is contained in:
Tim Berchtold 2025-07-20 15:56:43 +02:00
parent 35f20e4f63
commit 321923b056
2 changed files with 15 additions and 9 deletions

View file

@ -116,7 +116,6 @@ def orders(): #TODO on new orderGet refresh orders list
@app.route("/order_get", methods=['GET','POST'])
def order_get():
desk= 1
global config
#POST order
if request.method == 'POST' and config['SETTINGS']['lockqrcode_whit_secret'] == 'True':
@ -132,8 +131,11 @@ def order_get():
# Adding order to DB
if compare.process_main(ordered_list, desk):
return '<h1>your order got ressived!</h1>'
else:
#TODO IF nothing ordered send back to main and say something in a txt box
return '<h1>You have selected nothing try again</h1>'
return '<h1>your order coudnt be ressived try again Error:SQL </h1>'
# Veriefie if auth or not from GET
elif request.method == 'GET':
desk = int(request.args['desk'])