🐛 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:
parent
d8c7450576
commit
269cb9bc53
2 changed files with 2 additions and 2 deletions
|
|
@ -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,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue