mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
fixing custom inventory script error
the source_script ID wasn't getting translated to inventory script ID on sources_scope when editing a preexisting source
This commit is contained in:
@@ -1034,6 +1034,8 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
else if(fld === "inventory_script"){
|
else if(fld === "inventory_script"){
|
||||||
// the API stores it as 'source_script', we call it inventory_script
|
// the API stores it as 'source_script', we call it inventory_script
|
||||||
data.summary_fields['inventory_script'] = data.summary_fields.source_script;
|
data.summary_fields['inventory_script'] = data.summary_fields.source_script;
|
||||||
|
sources_scope.inventory_script = data.source_script;
|
||||||
|
master.inventory_script = sources_scope.inventory_script;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (data[fld] !== undefined) {
|
else if (data[fld] !== undefined) {
|
||||||
@@ -1396,7 +1398,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
if (mode === 'edit' || (mode === 'add' && group_created)) {
|
if (mode === 'edit' || (mode === 'add' && group_created)) {
|
||||||
Rest.put(data)
|
Rest.put(data)
|
||||||
.success(function () {
|
.success(function () {
|
||||||
if (properties_scope.variables) {
|
if (properties_scope.variables && properties_scope.variables !== "---") {
|
||||||
modal_scope.$emit('updateVariables', json_data, properties_scope.variable_url);
|
modal_scope.$emit('updateVariables', json_data, properties_scope.variable_url);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user