Commit 3ed4e4f3 by Aeolus

update

parent 5d4bffbf
......@@ -349,9 +349,9 @@ def run_machine_activate():
qrcode_no = json_data["qrcode_no"]
machine_no = json_data["machine_no"]
machine = Machine.query.filter_by(qrcode_no=qrcode_no, status=1).first()
machine = Machine.query.filter_by(qrcode_no=qrcode_no, status=0).first()
if machine and machine.machine_no == qrcode_no:
machine.machine_no = machine_no
machine.status = 1
db.session.add(machine)
db.session.commit()
return BaseResponse()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment