We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dd776f commit 3a6dde7Copy full SHA for 3a6dde7
1 file changed
internal/repository/announcement.go
@@ -22,7 +22,7 @@ func (r *announcementRepository) GetAnnouncements(ctx context.Context, query dom
22
dbQuery := r.db.WithContext(ctx)
23
24
if query.FilterIsActive {
25
- dbQuery = dbQuery.Where("available_until IS NULL OR available_until > NOW()")
+ dbQuery = dbQuery.Where("available_from <= NOW()").Where("available_until IS NULL OR available_until > NOW()")
26
}
27
28
sortDateDirection := func() string {
0 commit comments