Skip to content

Commit

Permalink
fix LastActive sanity check GetAllCached
Browse files Browse the repository at this point in the history
  • Loading branch information
AmyrAhmady committed Oct 22, 2023
1 parent 31e96b7 commit dd892f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/resources/server/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ func (s *DB) GetAllCached(ctx context.Context, lastActive time.Duration) ([]All,
}

for idx := range result {
if result[idx].LastActive.After(time.Now().Add(lastActive)) {
if result[idx].LastActive != nil && result[idx].LastActive.After(time.Now().Add(lastActive)) {
list = append(list, result[idx])
}
}
Expand Down

0 comments on commit dd892f3

Please sign in to comment.