Skip to content

Commit

Permalink
Fixes bug in issue total for a host
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsteele committed May 2, 2016
1 parent 41d9530 commit 165f343
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions app/lib/router/hosts.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ Router.route('/projects/:id/hosts/:hid/issues', {
]
}
var self = this
var total = 0
var issues = []
Issues.find(query, {
sort: {
Expand Down Expand Up @@ -487,17 +488,9 @@ Router.route('/projects/:id/hosts/:hid/issues', {
status: issue.status,
host: h
})
total += 1
})
})
var total = 0
Issues.find({
projectId: this.params.id,
hosts: {
$elemMatch: {ipv4: ipv4}
}
}).fetch().forEach(function (i) {
total += i.hosts.length
})

return {
routeName: Router.current().route.getName(),
Expand Down

0 comments on commit 165f343

Please sign in to comment.