mirror of
https://github.com/ansible/awx.git
synced 2026-03-10 05:59:28 -02:30
Use clone of params object to avoid time traveling
This commit is contained in:
@@ -10,14 +10,20 @@ function resolveVersions(service, _, results) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function resolveEmpties(result) {
|
function resolveEmpties(result) {
|
||||||
if (_.isEmpty(result.versions)) {
|
|
||||||
var originalStartDate = result.dateRange.from;
|
var newResult = _.merge({}, result);
|
||||||
result.dateRange.from = originalStartDate.clone().subtract(1, 'year');
|
|
||||||
result.dateRange.to = originalStartDate;
|
if (_.isEmpty(newResult.versions)) {
|
||||||
return [result, service.getVersion(result)];
|
var originalStartDate = result.dateRange.from.clone();
|
||||||
|
|
||||||
|
newResult.dateRange.from = originalStartDate.clone().subtract(1, 'year');
|
||||||
|
newResult.dateRange.to = originalStartDate;
|
||||||
|
|
||||||
|
return [newResult, service.getVersion(newResult)];
|
||||||
}
|
}
|
||||||
|
|
||||||
return [result, _.promise(result.versions)];
|
return [newResult, _.promise(newResult.versions)];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveDuplicates(nonEmptyResults) {
|
function resolveDuplicates(nonEmptyResults) {
|
||||||
|
|||||||
Reference in New Issue
Block a user