リレーションの関係でDELETEはUPDATEに

This commit is contained in:
suti7yk5032 2024-10-05 09:48:00 +09:00
parent ee4061d10b
commit 461bcf6fba

View file

@ -908,7 +908,7 @@ class DL():
cursor.execute("SELECT * FROM pc_list WHERE pc_number = %s", (pc_number,))
pc_list = cursor.fetchall()
if pc_list:
cursor.execute("DELETE FROM pc_list WHERE pc_number = %s", (pc_number,))
cursor.execute("UPDATE pc_list SET using_member_id = NULL, password_hash = NULL, pc_uuid = NULL, pc_token = NULL, master_password = NULL, detail = NULL, alt_name = NULL WHERE pc_number = %s", (pc_number,))
self.db.commit()
return {"result": 0, "about": "ok"}
else: