diff --git a/app/models/concerns/i_calendar_concern.rb b/app/models/concerns/i_calendar_concern.rb index fc6c09949..aa0253853 100644 --- a/app/models/concerns/i_calendar_concern.rb +++ b/app/models/concerns/i_calendar_concern.rb @@ -25,7 +25,7 @@ module ICalendarConcern e.dtstart = start_time e.dtend = group_slots.last[:end_at] e.summary = title - e.description = I18n.t('reservation_ics.description_slot', COUNT: group_slots.count, ITEM: reservable.name) + e.description = description(group_slots) e.ip_class = 'PRIVATE' e.alarm do |a| @@ -60,7 +60,7 @@ module ICalendarConcern when 'Training' I18n.t('reservation_ics.description_training', TYPE: reservable.name) when 'Event' - I18n.t('reservation_ics.description_event', NUMBER: nb_reserve_places + tickets.map(&:booked).reduce(:+)) + I18n.t('reservation_ics.description_event', NUMBER: nb_reserve_places + (tickets.map(&:booked).reduce(:+) || 0)) else Rails.logger.warn "Unexpected reservable type #{reservable_type}" I18n.t('reservation_ics.description_slot', COUNT: group_slots.count, ITEM: reservable_type) diff --git a/app/services/members/list_service.rb b/app/services/members/list_service.rb index d5033c645..955ac0ccd 100644 --- a/app/services/members/list_service.rb +++ b/app/services/members/list_service.rb @@ -42,7 +42,7 @@ class Members::ListService end def search(current_user, query, subscription, include_admins = 'false') - members = User.includes(:profile) + members = User.includes(:profile, :statistic_profile) .joins(:profile, :statistic_profile, :roles,