mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-14 23:22:44 +00:00
fix uuid4
This commit is contained in:
parent
2c7df30241
commit
8a53f64ea3
1 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue