Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Prevent duplication of groups/projects
  • Loading branch information
robertoberlim authored Apr 12, 2022
commit 2ca4a625b8dfff10ec2468263620da18394b49d6
7 changes: 6 additions & 1 deletion src/models/reportCollection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const Base = require('./base');
let projlist= [];

class reportCollection extends Base {
constructor(config) {
Expand All @@ -13,11 +14,15 @@ class reportCollection extends Base {

push(report) {
this.reports.push(report);
if (projlist.indexOf(report.project.name) === -1 {
projlist.push(report.project.name);
this.reports.push(report);
}
}

get length() {
return this.reports.length;
}
}

module.exports = reportCollection;
module.exports = reportCollection;