新規PCが登録できないバグ修正その2
This commit is contained in:
parent
9e01485e0a
commit
ecfc39695a
1 changed files with 3 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue