Skip to content

Commit

Permalink
Fix NoMethodError
Browse files Browse the repository at this point in the history
undefined method `activity_participations_demanded_annually' for nil (NoMethodError)

https://csa-admin.sentry.io/issues/5856682836
  • Loading branch information
thibaudgg committed Sep 16, 2024
1 parent 52f3f8f commit 3fb4027
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/membership.rb
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def activity_participations_demanded_annually_by_default

count = basket_quantity * basket_size&.activity_participations_demanded_annually
memberships_basket_complements.each do |mbc|
count += mbc.quantity * mbc.basket_complement.activity_participations_demanded_annually
count += mbc.quantity * mbc.basket_complement&.activity_participations_demanded_annually.to_i
end
count
end
Expand Down

0 comments on commit 3fb4027

Please sign in to comment.