From d925ed2f28cb6ca4eaf11f57a5121d4bc5d35e6f Mon Sep 17 00:00:00 2001 From: FFXN <31929997+FFXN@users.noreply.github.com> Date: Mon, 25 May 2026 16:36:35 +0800 Subject: [PATCH] feat: snippet new (#36617) --- api/services/workflow_draft_variable_service.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/api/services/workflow_draft_variable_service.py b/api/services/workflow_draft_variable_service.py index 59db147576..af25edd2bd 100644 --- a/api/services/workflow_draft_variable_service.py +++ b/api/services/workflow_draft_variable_service.py @@ -1,7 +1,7 @@ import dataclasses import json import logging -from collections.abc import Mapping, Sequence +from collections.abc import Mapping, Sequence, Set from concurrent.futures import ThreadPoolExecutor from datetime import datetime from enum import StrEnum @@ -271,12 +271,20 @@ class WorkflowDraftVariableService: ) def list_variables_without_values( - self, app_id: str, page: int, limit: int, user_id: str + self, + app_id: str, + page: int, + limit: int, + user_id: str, + *, + exclude_node_ids: Set[str] | None = None, ) -> WorkflowDraftVariableList: criteria = [ WorkflowDraftVariable.app_id == app_id, WorkflowDraftVariable.user_id == user_id, ] + if exclude_node_ids: + criteria.append(WorkflowDraftVariable.node_id.notin_(list(exclude_node_ids))) total = None base_stmt = select(WorkflowDraftVariable).where(*criteria) if page == 1: