Skip to content

Commit

Permalink
webapi: get active rollout for report
Browse files Browse the repository at this point in the history
Signed-off-by: Luis Gustavo S. Barreto <gustavo@ossystems.com.br>
  • Loading branch information
gustavosbarreto committed Apr 16, 2019
1 parent db1709e commit 41bf1bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/router/webapi/rollouts.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (api *RolloutsAPI) GetRolloutStatistics(c echo.Context) error {
}

var reports []models.Report
if err = api.db.Select(q.Eq("Device", d.UID)).Limit(1).OrderBy("Timestamp").Reverse().Find(&reports); err != nil {
if err = api.db.Select(q.Eq("Device", d.UID), q.Eq("Rollout", rollout.ID)).Limit(1).OrderBy("Timestamp").Reverse().Find(&reports); err != nil {
continue
}

Expand Down

0 comments on commit 41bf1bc

Please sign in to comment.