fix broken read all when there are objects with out scm object

This commit is contained in:
oleg 2015-10-12 20:08:24 +03:00
parent 5bd98c6719
commit cf4ea019da

View File

@ -30,7 +30,9 @@ module.exports = function(app) {
// omit big fields not needed for list
_(builds).each(function(build) {
delete build.stepTimings;
delete build.scm.changes;
if (build.scm) {
delete build.scm.changes;
}
build.project = _(build.project).pick(
'name', 'scm', 'avgBuildDuration'
);