Merge "Fix queue create/update without metadata modification"

This commit is contained in:
Jenkins 2017-09-05 05:43:38 +00:00 committed by Gerrit Code Review
commit 1d8b3bd0b8

View File

@ -87,7 +87,7 @@
return {data: queue.metadata}; return {data: queue.metadata};
} else { } else {
var deferred = $q.defer(); var deferred = $q.defer();
deferred.resolve({data: []}); deferred.resolve({data: {}});
return deferred.promise; return deferred.promise;
} }
} }
@ -95,10 +95,12 @@
function getExistingMetdataPromise(queue) { function getExistingMetdataPromise(queue) {
if (angular.isDefined(queue.id)) { if (angular.isDefined(queue.id)) {
$scope.stepModels.queueMetadataForm = queue.metadata;
return {data: queue.metadata}; return {data: queue.metadata};
} else { } else {
var deferred = $q.defer(); var deferred = $q.defer();
deferred.resolve({data: []}); deferred.resolve({data: {}});
$scope.stepModels.queueMetadataForm = {};
return deferred.promise; return deferred.promise;
} }
} }