File tree Expand file tree Collapse file tree
dolphinscheduler-ui/src/views/projects/task/components/node/fields Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -210,11 +210,15 @@ export function useDataX(model: { [field: string]: any }): IJsonItem[] {
210210 typeof fullName === 'string' &&
211211 fullName . toLowerCase ( ) . endsWith ( '.json' )
212212 ) . length === 1
213- if (
214- model . json === '' ||
213+ // Treat a whitespace-only value as absent too, matching the backend
214+ // DataxParameters.isInlineJsonAbsent which uses StringUtils.isBlank. Otherwise a
215+ // blank inline json would reach utils.isJson below and be rejected even when exactly
216+ // one valid .json resource is attached, a configuration the worker would have accepted.
217+ const inlineJsonAbsent =
215218 model . json === undefined ||
216- model . json === null
217- ) {
219+ model . json === null ||
220+ ( model . json as string ) . trim ( ) === ''
221+ if ( inlineJsonAbsent ) {
218222 return hasSingleJsonResource
219223 ? undefined
220224 : new Error ( t ( 'project.node.datax_custom_json_resource_tips' ) )
You can’t perform that action at this time.
0 commit comments