Fix activities multiple types selected [SCI-5546]

This commit is contained in:
aignatov-bio 2021-03-10 12:58:05 +01:00
parent 8202181095
commit c6e4d6ef94

View file

@ -28,7 +28,8 @@ class ActivitiesService
end end
query = query.where(owner_id: filters[:users]) if filters[:users] query = query.where(owner_id: filters[:users]) if filters[:users]
query = query.where(type_of: filters[:types]) if filters[:types] query = query.where(type_of: filters[:types].map(&:to_i)) if filters[:types]
query = query.where('created_at <= ?', Time.at(filters[:starting_timestamp].to_i)) if filters[:starting_timestamp] query = query.where('created_at <= ?', Time.at(filters[:starting_timestamp].to_i)) if filters[:starting_timestamp]
activities = activities =