Fixed bug adding a normal inventory

This commit is contained in:
Michael Abashian
2017-05-01 11:24:54 -04:00
committed by Jared Tabor
parent fcc70f69fa
commit e3adc46e30

View File

@@ -49,9 +49,9 @@ function InventoriesAdd($scope, $location,
$scope.parseType = 'yaml'; $scope.parseType = 'yaml';
ParseTypeChange({ ParseTypeChange({
scope: $scope, scope: $scope,
variable: 'variables', variable: 'inventory_variables',
parse_variable: 'parseType', parse_variable: 'parseType',
field_id: 'inventory_variables' field_id: 'inventory_inventory_variables'
}); });
} }
@@ -59,9 +59,7 @@ function InventoriesAdd($scope, $location,
$scope.formSave = function() { $scope.formSave = function() {
Wait('start'); Wait('start');
try { try {
var fld, json_data, data; var fld, data;
json_data = ToJSON($scope.parseType, $scope.variables, true);
data = {}; data = {};
for (fld in form.fields) { for (fld in form.fields) {