[bitbake-devel] [PATCH 01/23] toastergui: fix angular error

Alex DAMIAN alexandru.damian at intel.com
Thu Jun 25 10:33:38 UTC 2015


From: Alexandru DAMIAN <alexandru.damian at intel.com>

Due to invalid identification of builds in the array update
code (by id and status), we could end up with multiple entries
sharing the same primary id, visible in the UI as an angular error.

We modify the code to identify the builds exclusively by id.

[YOCTO #7611]

Signed-off-by: Alexandru DAMIAN <alexandru.damian at intel.com>
---
 lib/toaster/toastergui/static/js/projectapp.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/toaster/toastergui/static/js/projectapp.js b/lib/toaster/toastergui/static/js/projectapp.js
index 44e244d..b2e65c5 100644
--- a/lib/toaster/toastergui/static/js/projectapp.js
+++ b/lib/toaster/toastergui/static/js/projectapp.js
@@ -341,7 +341,7 @@ projectApp.controller('prjCtrl', function($scope, $modal, $http, $interval, $loc
                     var toDelete = [];
                     // step 1 - delete entries not found
                     $scope.builds.forEach(function (elem) {
-                        if (-1 == _data.builds.findIndex(function (elemX) { return elemX.id == elem.id && elemX.status == elem.status; })) {
+                        if (-1 == _data.builds.findIndex(function (elemX) { return elemX.id == elem.id; })) {
                             toDelete.push(elem);
                         }
                     });
-- 
1.9.1




More information about the bitbake-devel mailing list