fix(接口测试): 参数提取表格过滤条件修复
Some checks failed
MeterSphere 前端代码校验 / 前端代码校验 (push) Failing after -9s
Mirror GitHub Auto Queried Repos to Gitee / Sync-GitHub-to-Gitee (push) Failing after -6s

This commit is contained in:
baiqi 2025-01-24 15:20:40 +08:00 committed by Craftsman
parent ddf18efe14
commit 91cd58c649

View file

@ -12,6 +12,7 @@ import { RequestBodyFormat, RequestConditionProcessor, RequestParamsType } from
import { import {
defaultBodyParams, defaultBodyParams,
defaultBodyParamsItem, defaultBodyParamsItem,
defaultExtractParamItem,
defaultHeaderParamsItem, defaultHeaderParamsItem,
defaultKeyValueParamItem, defaultKeyValueParamItem,
defaultRequestParamsItem, defaultRequestParamsItem,
@ -251,10 +252,16 @@ export function filterConditionsSqlValidParams(condition: ExecuteConditionConfig
if (processor.processorType === RequestConditionProcessor.SQL) { if (processor.processorType === RequestConditionProcessor.SQL) {
processor.extractParams = filterKeyValParams(processor.extractParams || [], defaultKeyValueParamItem).validParams; processor.extractParams = filterKeyValParams(processor.extractParams || [], defaultKeyValueParamItem).validParams;
} else if (processor.processorType === RequestConditionProcessor.EXTRACT && processor.extractors) { } else if (processor.processorType === RequestConditionProcessor.EXTRACT && processor.extractors) {
processor.extractors = filterKeyValParams( const defaultExtractorItem = cloneDeep(
processor.extractors, processor.extractors.length
processor.extractors[processor.extractors.length - 1] ? {
).validParams; ...defaultExtractParamItem,
variableType: processor.extractors[processor.extractors.length - 1].variableType,
extractType: processor.extractors[processor.extractors.length - 1].extractType,
}
: defaultExtractParamItem
);
processor.extractors = filterKeyValParams(processor.extractors, defaultExtractorItem).validParams;
} }
return processor; return processor;
}); });