From f4bbab1485470481fa68c30cecb0d10c08510c17 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Wed, 4 Jun 2025 12:13:36 +0200 Subject: [PATCH] More concise --- app/models/card/entropy.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/card/entropy.rb b/app/models/card/entropy.rb index 3b988f00d..f91b8e814 100644 --- a/app/models/card/entropy.rb +++ b/app/models/card/entropy.rb @@ -8,7 +8,7 @@ module Card::Entropy scope :entropic_by, ->(period_name) do left_outer_joins(collection: :entropy_configuration) .where("last_active_at <= DATETIME('now', '-' || COALESCE(entropy_configurations.#{period_name}, (?)) || ' seconds')", - Entropy::Configuration.where(id: Account.sole.default_entropy_configuration).limit(1).to_sql) + Entropy::Configuration.where(id: Account.sole.default_entropy_configuration).select("id").limit(1)) end scope :stagnated, -> do