Skip to content

Commit

Permalink
Take bucket countedness into account when calculating availability
Browse files Browse the repository at this point in the history
  • Loading branch information
nbudin committed Nov 26, 2024
1 parent 29f7ff2 commit f480148
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/presenters/run_availability_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f480148

Please sign in to comment.