blob: b9292b6ea0b8065c151f6cd0df09886075357597 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
from main import cursor
import uuid
def new_uuid():
temp_uuid = str(uuid.uuid4())
# check if user_id is already taken
if cursor.execute("select user_id from users where user_id = ?", [temp_uuid]).fetchone():
return new_uuid()
else:
return temp_uuid
|