From 27c06a728545302c2330b32b9ce17dee9b207e9d Mon Sep 17 00:00:00 2001 From: mabashian Date: Mon, 10 Sep 2018 13:12:19 -0400 Subject: [PATCH] Fixes bug in wfjt node form where rows weren't remaining selected after being clicked --- awx/ui/client/src/templates/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/awx/ui/client/src/templates/main.js b/awx/ui/client/src/templates/main.js index a7890c288b..61d04b6b82 100644 --- a/awx/ui/client/src/templates/main.js +++ b/awx/ui/client/src/templates/main.js @@ -499,7 +499,7 @@ angular.module('templates', [surveyMaker.name, jobTemplates.name, labels.name, p $scope.$watch('selectedTemplate', () => { $scope.job_templates.forEach(function(row, i) { - if(_.has($scope, 'selectedTemplate.id') && row.id === $scope.selectedTemplate.id) { + if(_.hasIn($scope, 'selectedTemplate.id') && row.id === $scope.selectedTemplate.id) { $scope.job_templates[i].checked = 1; } else { @@ -576,7 +576,7 @@ angular.module('templates', [surveyMaker.name, jobTemplates.name, labels.name, p $scope.$watch('selectedTemplate', () => { $scope.workflow_inventory_sources.forEach(function(row, i) { - if(_.has($scope, 'selectedTemplate.id') && row.id === $scope.selectedTemplate.id) { + if(_.hasIn($scope, 'selectedTemplate.id') && row.id === $scope.selectedTemplate.id) { $scope.workflow_inventory_sources[i].checked = 1; } else { @@ -653,7 +653,7 @@ angular.module('templates', [surveyMaker.name, jobTemplates.name, labels.name, p $scope.$watch('selectedTemplate', () => { $scope.projects.forEach(function(row, i) { - if(_.has($scope, 'selectedTemplate.id') && row.id === $scope.selectedTemplate.id) { + if(_.hasIn($scope, 'selectedTemplate.id') && row.id === $scope.selectedTemplate.id) { $scope.projects[i].checked = 1; } else {