fix: ensure unique flow names when assigning to superuser and avoid adding starter projects (#4751)
* fix: ensure unique flow names when assigning to superuser * refactor: Creates a new function with logic to rename flows * refactor: simplify function * Extract STARTER_FOLDER constants to a separate module * Filter orphaned flows by excluding those in the starter folder --------- Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
parent
12407f00af
commit
e728e40561
7 changed files with 76 additions and 51 deletions
|
|
@ -17,7 +17,7 @@ from dotenv import load_dotenv
|
|||
from fastapi.testclient import TestClient
|
||||
from httpx import ASGITransport, AsyncClient
|
||||
from langflow.graph import Graph
|
||||
from langflow.initial_setup.setup import STARTER_FOLDER_NAME
|
||||
from langflow.initial_setup.constants import STARTER_FOLDER_NAME
|
||||
from langflow.services.auth.utils import get_password_hash
|
||||
from langflow.services.database.models.api_key.model import ApiKey
|
||||
from langflow.services.database.models.flow.model import Flow, FlowCreate
|
||||
|
|
|
|||
|
|
@ -3,11 +3,9 @@ from datetime import datetime
|
|||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from langflow.custom.directory_reader.utils import (
|
||||
abuild_custom_component_list_from_path,
|
||||
)
|
||||
from langflow.custom.directory_reader.utils import abuild_custom_component_list_from_path
|
||||
from langflow.initial_setup.constants import STARTER_FOLDER_NAME
|
||||
from langflow.initial_setup.setup import (
|
||||
STARTER_FOLDER_NAME,
|
||||
get_project_data,
|
||||
load_starter_projects,
|
||||
update_projects_components_with_latest_component_versions,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue