Browse Source

fix prev logs showing current log.

master 2.2.4
Gisle Aune 4 years ago
parent
commit
a606b79736
  1. 8
      services/logs.go

8
services/logs.go

@ -857,6 +857,10 @@ func (s *LogService) NextLogs(ctx context.Context, log *models.Log) ([]*models.L
return logs[i].Date.Before(logs[j].Date)
})
if len(logs) >= 1 && logs[0].ID == log.ID {
logs = logs[1:]
}
return s.findSuggestions(ctx, log, logs)
}
@ -868,6 +872,10 @@ func (s *LogService) PrevLogs(ctx context.Context, log *models.Log) ([]*models.L
return nil, err
}
if len(logs) >= 1 && logs[0].ID == log.ID {
logs = logs[1:]
}
return s.findSuggestions(ctx, log, logs)
}

Loading…
Cancel
Save