if文のあたりのミスを修正

This commit is contained in:
suti7yk5032 2024-08-26 00:16:53 +09:00
parent 27361d40db
commit c6c602a34b

View file

@ -179,13 +179,13 @@ class Auth():
pc_record = cursor.fetchall()
pc_record_uuid = pc_record[0][0]
if pc_record_uuid == None:
return {"result": 1, "about": "exist"}
else:
pc_token = self.token_generate(36)
cursor.execute("UPDATE pc_list SET pc_uuid = %s, pc_token = %s WHERE pc_number = %s", (pc_uuid, pc_token, pc_number))
self.db.commit()
os.remove(onetime_config_path)
return {"result": 0, "about": "ok", "output_dict": {"pc_token": pc_token}}
else:
return {"result": 1, "about": "exist"}
except Exception as error:
print("停止処理中にエラーが発生しました。\nエラー内容")