mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 00:39:35 +08:00
🐛 fix(__main__.py): pass the session as a keyword argument 'db' to the create_super_user function for clarity and consistency
🐛 fix(test_user.py): pass the session as a keyword argument 'db' to the create_super_user function for clarity and consistency
This commit is contained in:
@ -356,7 +356,7 @@ def superuser(
|
||||
with session_getter(db_manager) as session:
|
||||
from langflow.services.auth.utils import create_super_user
|
||||
|
||||
if create_super_user(session, username, password):
|
||||
if create_super_user(db=session, username=username, password=password):
|
||||
# Verify that the superuser was created
|
||||
from langflow.services.database.models.user.user import User
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ def super_user(client, session):
|
||||
settings_manager = get_settings_manager()
|
||||
auth_settings = settings_manager.auth_settings
|
||||
return create_super_user(
|
||||
session,
|
||||
db=session,
|
||||
username=auth_settings.FIRST_SUPERUSER,
|
||||
password=auth_settings.FIRST_SUPERUSER_PASSWORD,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user