allow AD_HOC_COMMANDS to be set to [] in the settings ui

see: #4975
This commit is contained in:
Ryan Petrello 2017-02-23 10:51:54 -05:00
parent e1c2a06246
commit fc583ead21
2 changed files with 7 additions and 1 deletions

View File

@ -111,6 +111,7 @@ register(
help_text=_('List of modules allowed to be used by ad-hoc jobs.'),
category=_('Jobs'),
category_slug='jobs',
required=False,
)
register(

View File

@ -364,7 +364,12 @@ export default [
payload[key] = _.map($scope[key], 'value').join(',');
}
} else {
payload[key] = $scope[key].value;
if(multiselectDropdowns.indexOf(key) !== -1) {
// Default AD_HOC_COMMANDS to an empty list
payload[key] = $scope[key].value || [];
} else {
payload[key] = $scope[key].value;
}
}
} else if($scope.configDataResolve[key].type === 'list' && $scope[key] !== null) {
// Parse lists