Commit 04bcafb5 authored by crazywoola's avatar crazywoola

chore: update code

parent a03a92e9
......@@ -96,13 +96,11 @@ def generate_session_id():
"""
Generate a unique session ID.
"""
count = 1
session_id = ''
while count != 0:
while True:
session_id = str(uuid.uuid4())
count = db.session.query(EndUser) \
existing_count = db.session.query(EndUser) \
.filter(EndUser.session_id == session_id).count()
if existing_count == 0:
return session_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment