Fix queue create/update without metadata modification
When metadata is not modified in queue create/update, the operation failed. This problem was caused by the patch that changing `$scope` handling[1]. This patch fixes it. [1] https://review.openstack.org/#/c/497127/ Change-Id: Ia7a524c5991c63caa24be7effc1a3bdfb8f914c4 Closes-Bug: #1647995
This commit is contained in:
parent
1ca7eca42a
commit
89e908c5a2
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user