From 8a53f64ea3bcd98e05d1f2b48c674396556446ed Mon Sep 17 00:00:00 2001 From: MiXaiLL76 Date: Sun, 15 Mar 2026 18:36:25 +0300 Subject: [PATCH] fix uuid4 --- backend/open_webui/models/auths.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/models/auths.py b/backend/open_webui/models/auths.py index 7cda44a42b..72478e051e 100644 --- a/backend/open_webui/models/auths.py +++ b/backend/open_webui/models/auths.py @@ -97,11 +97,14 @@ class AuthsTable: role: str = 'pending', oauth: Optional[dict] = None, db: Optional[Session] = None, - id: Optional[str] = str(uuid.uuid4()), + id: Optional[str] = None, ) -> Optional[UserModel]: with get_db_context(db) as db: log.info('insert_new_auth') + if id is None: + id = str(uuid.uuid4()) + auth = AuthModel(**{'id': id, 'email': email, 'password': password, 'active': True}) result = Auth(**auth.model_dump()) db.add(result)