mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 05:16:40 +08:00
fix(frontend): filter duplicate draft/live connections in deploy modal (#12724)
* fix(frontend): filter duplicate draft/live connections in deploy modal
Connections with same app_id can exist as both draft and live, causing
both to appear selected simultaneously. Filter to draft-only and add
environment badge for clarity.
LFOSS-3373
* fix: remove connection environment badge
(cherry picked from commit 899f82de5b)
This commit is contained in:
committed by
Eric Hare
parent
5307f400bf
commit
7b06c2033c
@ -78,16 +78,17 @@ export default function StepAttachFlows() {
|
||||
return;
|
||||
seededExistingConnections.current = true;
|
||||
|
||||
const existingConnections: ConnectionItem[] = configsData.configs.map(
|
||||
(cfg) => ({
|
||||
const existingConnections: ConnectionItem[] = configsData.configs
|
||||
.filter((cfg) => cfg.environment !== "live")
|
||||
.map((cfg) => ({
|
||||
id: cfg.app_id,
|
||||
connectionId: cfg.connection_id,
|
||||
name: cfg.app_id,
|
||||
environment: cfg.environment,
|
||||
variableCount: 0,
|
||||
isNew: false,
|
||||
environmentVariables: {},
|
||||
}),
|
||||
);
|
||||
}));
|
||||
|
||||
setConnections((prev) => {
|
||||
// Avoid duplicates if user already created connections with the same id
|
||||
|
||||
Reference in New Issue
Block a user