Skip to content

Commit

Permalink
Check for empty source url.
Browse files Browse the repository at this point in the history
  • Loading branch information
chandra-tacc committed Sep 15, 2023
1 parent c5aa122 commit fa2d40d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions client/src/components/Applications/AppForm/AppForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,6 @@ export const AppSchemaForm = ({ app }) => {
targetDir: isTargetPathField(k) ? v : null,
};
})
.filter((fileInput) => fileInput.sourceUrl || fileInput.targetDir) // filter out any empty values
.reduce((acc, entry) => {
// merge input field and targetPath fields into one.
const key = getInputFieldFromTargetPathField(entry.name);
Expand All @@ -493,7 +492,9 @@ export const AppSchemaForm = ({ app }) => {
acc[key]['targetPath'] ?? entry.targetDir;
return acc;
}, {})
).flat();
)
.flat()
.filter((fileInput) => fileInput.sourceUrl); // filter out any empty values

job.parameterSet = Object.assign(
{},
Expand Down

0 comments on commit fa2d40d

Please sign in to comment.