Skip to content

Commit

Permalink
Fix: for condition
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Jul 7, 2023
1 parent ed3d25d commit 0787698
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/postgres/operation/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (storage *Storage) Last(filters map[string]interface{}, lastID int64) (oper
current = time.Date(time.Now().Year(), 1, 1, 0, 0, 0, 0, time.UTC)
)

for current.Year() < 2018 {
for current.Year() >= 2018 {
query := storage.DB.Model((*operation.Operation)(nil)).
Where("deffated_storage is not null").
Where("timestamp >= ?", current).
Expand Down

0 comments on commit 0787698

Please sign in to comment.