File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -275,6 +275,15 @@ export default {
275275 if (configrecord .type === ' WhitespaceSeparatedListWithOptions' ) {
276276 newValue = newValue .join (' ' )
277277 }
278+
279+ // The updateConfiguration API expects a blank string to clean up the configuration value
280+ if (
281+ ([' CSV' , ' Order' , ' WhitespaceSeparatedListWithOptions' ].includes (configrecord .type ) && Object .keys (newValue).length === 0 ) ||
282+ (configrecord .type === ' String' && newValue .length === 0 )
283+ ) {
284+ newValue = ' '
285+ }
286+
278287 const params = {
279288 [this .scopeKey ]: this .$route .params ? .id ,
280289 name: configrecord .name ,
@@ -362,6 +371,17 @@ export default {
362371 }
363372 return 0
364373 }
374+
375+ if (configrecord .value ? .trim ().length === 0 ) {
376+ if ([' CSV' , ' Order' , ' WhitespaceSeparatedListWithOptions' ].includes (configrecord .type )) {
377+ return []
378+ }
379+
380+ if (configrecord .type === ' String' ) {
381+ return ' '
382+ }
383+ }
384+
365385 if ([' Order' , ' CSV' ].includes (configrecord .type )) {
366386 if (configrecord .value && configrecord .value .length > 0 ) {
367387 return String (configrecord .value ).split (' ,' )
You can’t perform that action at this time.
0 commit comments