Merge pull request #3209 from aignatov-bio/ai-sci-5546-fix-activities-multiple-types-selected

Fix activities multiple types selected [SCI-5546]
This commit is contained in:
aignatov-bio 2021-03-17 10:08:18 +01:00 committed by GitHub
commit a0c506e6fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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 =