mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-02 21:51:51 +08:00
Fix activity to_date filtering [SCI-9704] (#6840)
This commit is contained in:
parent
8a9d4a772a
commit
668ae018c1
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,8 @@ class ActivitiesService
|
|||
to: Time.zone.parse(filters[:to_date]).beginning_of_day.utc)
|
||||
elsif filters[:from_date].present? && filters[:to_date].blank?
|
||||
query.where('created_at <= :from', from: Time.zone.parse(filters[:from_date]).end_of_day.utc)
|
||||
elsif filters[:from_date].blank? && filters[:to_date].present?
|
||||
query.where('created_at >= :to', to: Time.zone.parse(filters[:to_date]).beginning_of_day.utc)
|
||||
else
|
||||
query
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue