Skip to content

Commit

Permalink
fix(admin-ui): remove location path on db selection
Browse files Browse the repository at this point in the history
  • Loading branch information
jv18creator committed Jul 20, 2023
1 parent c464876 commit b9bb41b
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,16 @@ function CustomScriptForm({ item, scripts, handleSubmit, viewOnly }) {
}),

onSubmit: (values) => {
if(item.locationType === 'db') {
let moduleProperties = item.moduleProperties.filter((item) => item.value1 !== 'location_path')
item.moduleProperties = moduleProperties
delete item?.locationPath
delete values.locationPath
} else if(item.locationType === 'file') {
delete item?.script
delete values.script
}

values.level = item.level
values.moduleProperties = item.moduleProperties
// eslint-disable-next-line no-extra-boolean-cast
Expand Down

0 comments on commit b9bb41b

Please sign in to comment.