Fix creation of model.Alert from types.Alert

This commit is contained in:
Fabian Reinartz 2015-10-11 12:33:54 +02:00
parent c84a287be6
commit 9b0ceacef8
1 changed files with 2 additions and 2 deletions

View File

@ -41,8 +41,8 @@ func Alerts(alerts ...*Alert) model.Alerts {
for _, a := range alerts {
v := a.Alert
// If the end timestamp was set as the expected value in case
// of a timeout, do not expose it.
if a.Timeout {
// of a timeout but is not reached yet, do not expose it.
if a.Timeout && !a.Resolved() {
v.EndsAt = time.Time{}
}
res = append(res, &v)