Skip to content

Commit

Permalink
Resolve model specs with coercion fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cycomachead committed Feb 13, 2024
1 parent 460acc8 commit ad9b8da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/conference.rb
Original file line number Diff line number Diff line change
Expand Up @@ -893,11 +893,12 @@ def get_events_per_week_by_state

# Completed weeks
events_per_week.each do |week, values|
week = week.respond_to?(:strftime) ? week : Date.parse(week)
values.each do |state, value|
next unless %i[confirmed unconfirmed].include?(state)

result[state.to_s.capitalize] = {} unless result[state.to_s.capitalize]
result[state.to_s.capitalize][DateTime.parse(week).strftime('%W').to_i] = value
result[state.to_s.capitalize][week.strftime('%W').to_i] = value
end
end

Expand Down

0 comments on commit ad9b8da

Please sign in to comment.