Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Update database fake to check for nil time when streaming logs
  • Loading branch information
kylecarbs committed Jun 26, 2022
commit 11b4647f33529a608166e01ca9519de5e25a048b
4 changes: 2 additions & 2 deletions coderd/database/databasefake/databasefake.go
Original file line number Diff line number Diff line change
Expand Up @@ -1360,10 +1360,10 @@ func (q *fakeQuerier) GetProvisionerLogsByIDBetween(_ context.Context, arg datab
if jobLog.JobID.String() != arg.JobID.String() {
continue
}
if jobLog.CreatedAt.After(arg.CreatedBefore) {
if !arg.CreatedBefore.IsZero() && jobLog.CreatedAt.After(arg.CreatedBefore) {
continue
}
if jobLog.CreatedAt.Before(arg.CreatedAfter) {
if !arg.CreatedAfter.IsZero() && jobLog.CreatedAt.Before(arg.CreatedAfter) {
continue
}
logs = append(logs, jobLog)
Expand Down