🐛 fix(endpoints.py): add check for empty custom_component_dict to prevent errors
🐛 fix(login.py): update import statement for auth utils module 🐛 fix(users.py): update import statement for auth utils module 🐛 fix(factory.py): remove unnecessary argument from create method 🐛 fix(test_cli.py): convert temp_dir to string before checking if it's in COMPONENTS_PATH
This commit is contained in:
parent
0a235ef8d5
commit
48965a8ba8
5 changed files with 6 additions and 4 deletions
|
|
@ -59,6 +59,8 @@ def get_all():
|
|||
logger.info(f"Loading {len(custom_component_dicts)} category(ies)")
|
||||
for custom_component_dict in custom_component_dicts:
|
||||
# custom_component_dict is a dict of dicts
|
||||
if not custom_component_dict:
|
||||
continue
|
||||
category = list(custom_component_dict.keys())[0]
|
||||
logger.info(
|
||||
f"Loading {len(custom_component_dict[category])} component(s) from category {category}"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from fastapi.security import OAuth2PasswordRequestForm
|
|||
|
||||
from langflow.services.utils import get_session
|
||||
from langflow.services.database.models import Token
|
||||
from langflow.auth.auth import (
|
||||
from langflow.services.auth.utils import (
|
||||
authenticate_user,
|
||||
create_user_tokens,
|
||||
create_refresh_token,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ from sqlmodel import Session, select
|
|||
from fastapi import APIRouter, Depends, HTTPException
|
||||
|
||||
from langflow.services.utils import get_session
|
||||
from langflow.auth.auth import get_current_active_user, get_password_hash
|
||||
from langflow.services.auth.utils import get_current_active_user, get_password_hash
|
||||
from langflow.services.database.models.user import (
|
||||
update_user,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,6 @@ class ChatManagerFactory(ServiceFactory):
|
|||
def __init__(self):
|
||||
super().__init__(ChatManager)
|
||||
|
||||
def create(self, settings_service):
|
||||
def create(self):
|
||||
# Here you would have logic to create and configure a ChatManager
|
||||
return ChatManager()
|
||||
|
|
|
|||
|
|
@ -27,4 +27,4 @@ def test_components_path(runner, client, default_settings):
|
|||
)
|
||||
assert result.exit_code == 0, result.stdout
|
||||
settings_manager = utils.get_settings_manager()
|
||||
assert temp_dir in settings_manager.settings.COMPONENTS_PATH
|
||||
assert str(temp_dir) in settings_manager.settings.COMPONENTS_PATH
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue