diff --git a/lib/low_balance.rb b/lib/low_balance.rb index 41bbdd8639cc50fa894cde4811ea7882c1163b48..a02445975e951fdbcea9f24f6be2565de58247ef 100644 --- a/lib/low_balance.rb +++ b/lib/low_balance.rb @@ -8,10 +8,10 @@ class LowBalance return Locked.new unless customer.registered? ExpiringLock.new( - "jmp_customer_low_balance-#{customer.customer_id}", + "jmp_customer_low_balance-#{customer.billing_customer_id}", expiry: 60 * 60 * 24 * 7 ).with(-> { Locked.new }) do - for_no_lock(customer) + customer.billing_customer.then(&method(:for_no_lock)) end end