Skip to content

Commit dbb067e

Browse files
author
Andreas Müller
committed
Merge remote-tracking branch 'd/group_project_dupe_fix' into main
2 parents 10b3662 + db161e3 commit dbb067e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/models/reportCollection.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const Base = require('./base');
2+
let projlist = [];
23

34
class reportCollection extends Base {
45
constructor(config) {
@@ -12,12 +13,14 @@ class reportCollection extends Base {
1213
}
1314

1415
push(report) {
15-
this.reports.push(report);
16+
if (projlist.indexOf(report.project.name) === -1) {
17+
projlist.push(report.project.name);
18+
this.reports.push(report);
19+
}
1620
}
17-
1821
get length() {
1922
return this.reports.length;
2023
}
2124
}
2225

23-
module.exports = reportCollection;
26+
module.exports = reportCollection;

0 commit comments

Comments
 (0)