Format flows.py
This commit is contained in:
parent
e9db0bffc0
commit
91a98ae877
1 changed files with 9 additions and 3 deletions
|
|
@ -11,8 +11,12 @@ from sqlmodel import Session, select
|
|||
from langflow.api.utils import remove_api_keys, validate_is_component
|
||||
from langflow.api.v1.schemas import FlowListCreate, FlowListRead
|
||||
from langflow.services.auth.utils import get_current_active_user
|
||||
from langflow.services.database.models.flow import (Flow, FlowCreate, FlowRead,
|
||||
FlowUpdate)
|
||||
from langflow.services.database.models.flow import (
|
||||
Flow,
|
||||
FlowCreate,
|
||||
FlowRead,
|
||||
FlowUpdate,
|
||||
)
|
||||
from langflow.services.database.models.user.model import User
|
||||
from langflow.services.deps import get_session, get_settings_service
|
||||
|
||||
|
|
@ -52,7 +56,9 @@ def read_flows(
|
|||
flows = validate_is_component(flows)
|
||||
# with the session get the flows that DO NOT have a user_id
|
||||
try:
|
||||
example_flows = session.exec(select(Flow).where(Flow.user_id == None)).all()
|
||||
example_flows = session.exec(
|
||||
select(Flow).where(Flow.user_id == None)
|
||||
).all() # noqa
|
||||
flows.extend(example_flows)
|
||||
except Exception as e:
|
||||
logger.error(e)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue