Skip to content

Commit

Permalink
allow null To in query
Browse files Browse the repository at this point in the history
  • Loading branch information
elijahstorm authored and aybabtme committed Oct 20, 2024
1 parent 088d0b3 commit cb15055
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/localstorage/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ type SummarizedEvents struct {
}

func (str *MemStorage) Query(ctx context.Context, q *typesv1.LogQuery) ([]Cursor, error) {
if q.From.AsTime().After(q.To.AsTime()) {
if q.To != nil && q.From.AsTime().After(q.To.AsTime()) {
return nil, fmt.Errorf("invalid query, `to` is before `from`")
}

Expand Down

0 comments on commit cb15055

Please sign in to comment.