'unique_key' shouldn't be saved as bytes

This commit is contained in:
Koen van Zuijlen
2018-10-29 13:47:35 +01:00
parent 2be479fc9f
commit ec41d49454
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1051,7 +1051,7 @@ class Session(Storage):
if record_id.isdigit() and long(record_id) > 0:
new_unique_key = web2py_uuid()
row = table(record_id)
if row and row[b'unique_key'] == to_bytes(unique_key):
if row and row['unique_key'] == unique_key:
table._db(table.id == record_id).update(unique_key=new_unique_key)
else:
record_id = None