From f48014817560c258040a40740987d93effc21da5 Mon Sep 17 00:00:00 2001 From: Nat Budin Date: Tue, 26 Nov 2024 14:36:48 -0800 Subject: [PATCH] Take bucket countedness into account when calculating availability --- app/presenters/run_availability_presenter.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/presenters/run_availability_presenter.rb b/app/presenters/run_availability_presenter.rb index a1d9ece502..2c7a96441c 100644 --- a/app/presenters/run_availability_presenter.rb +++ b/app/presenters/run_availability_presenter.rb @@ -9,7 +9,11 @@ def initialize(bucket, signup_count_presenter) end def confirmed_count - signup_count_presenter.signup_count(bucket_key: bucket.key, state: "confirmed", counted: true) + if bucket.counted? + signup_count_presenter.signup_count(bucket_key: bucket.key, state: "confirmed", counted: true) + else + signup_count_presenter.signup_count(bucket_key: bucket.key, state: "confirmed") + end end def available_slots