mirror of
https://github.com/SrIzan10/hc-harbor.git
synced 2026-05-01 10:45:21 +00:00
apply the category exclusion in heartbeatable
This commit is contained in:
@@ -242,6 +242,9 @@ module Heartbeatable
|
||||
model_class = scope.model
|
||||
base_scope = model_class.all.with_valid_timestamps
|
||||
|
||||
excluded_categories = ["browsing", "ai coding", "meeting", "communicating"]
|
||||
base_scope = base_scope.where.not("LOWER(category) IN (?)", excluded_categories)
|
||||
|
||||
if scope.where_values_hash["user_id"]
|
||||
base_scope = base_scope.where(user_id: scope.where_values_hash["user_id"])
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user