From e47657759fcf60ac16dc8f10792e302b8b2a8a12 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Tue, 16 Dec 2025 10:08:25 +0100 Subject: [PATCH] More concise --- saas/app/models/account/limited.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/saas/app/models/account/limited.rb b/saas/app/models/account/limited.rb index 6fed72e9e..eaf391ca1 100644 --- a/saas/app/models/account/limited.rb +++ b/saas/app/models/account/limited.rb @@ -8,11 +8,7 @@ module Account::Limited NEAR_CARD_LIMIT_THRESHOLD = 100 def override_limits(card_count:) - if overridden_limits - overridden_limits.update(card_count: card_count) - else - create_overridden_limits(card_count: card_count) - end + (overridden_limits || build_overridden_limits).update!(card_count:) end def billed_cards_count