From ecfc39695aa15964f2650f4560da45e3590b556e Mon Sep 17 00:00:00 2001 From: suti7yk5032 Date: Sat, 5 Oct 2024 10:18:29 +0900 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E8=A6=8FPC=E3=81=8C=E7=99=BB=E9=8C=B2?= =?UTF-8?q?=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=E3=83=90=E3=82=B0=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=E3=81=9D=E3=81=AE=EF=BC=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dislocker_auth.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dislocker_auth.py b/dislocker_auth.py index 6befeae..c819015 100644 --- a/dislocker_auth.py +++ b/dislocker_auth.py @@ -304,9 +304,6 @@ class Auth(): cursor = self.db.cursor() pc_number = int(kwargs["pc_number"]) pc_uuid = str(kwargs["pc_uuid"]) - cursor.execute("SELECT pc_uuid FROM pc_list WHERE pc_number = %s", (pc_number,)) - pc_record_uuid_source = cursor.fetchall() - pc_record_uuid = pc_record_uuid_source[0][0] cursor.execute("SELECT pc_number FROM pc_list WHERE pc_number = %s", (pc_number,)) pc_record_number_source = cursor.fetchall() @@ -318,6 +315,9 @@ class Auth(): self.db.commit() return {"result": 0, "about": "ok", "output_dict": {"pc_token": pc_token, "master_password": master_password, "master_password_hash": master_password_hash}} else: + cursor.execute("SELECT pc_uuid FROM pc_list WHERE pc_number = %s", (pc_number,)) + pc_record_uuid_source = cursor.fetchall() + pc_record_uuid = pc_record_uuid_source[0][0] if pc_record_uuid == None: pc_token = self.token_generate(36) master_password = self.master_password_generate(16)