diff --git a/services/logs.go b/services/logs.go index 8490497..7b0ef29 100644 --- a/services/logs.go +++ b/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) }