Fixed an error on the home page that occurs when the schedule is published
This commit is contained in:
parent
f773aa7f76
commit
ab2e8201dc
@ -570,10 +570,10 @@ class ApplicationController < LinguaFrancaApplicationController
|
|||||||
|
|
||||||
@schedule.each do | day, data |
|
@schedule.each do | day, data |
|
||||||
@schedule[day][:times] = data[:times].sort.to_h
|
@schedule[day][:times] = data[:times].sort.to_h
|
||||||
if do_analyze || @schedule[day][:locations].empty?
|
@schedule[day][:locations] ||= {}
|
||||||
@schedule[day][:locations] ||= {}
|
|
||||||
@schedule[day][:locations][0] = :add
|
# add an empty block if no workshops are scheduled on this day yet
|
||||||
end
|
@schedule[day][:locations][0] = :add if do_analyze || @schedule[day][:locations].empty?
|
||||||
|
|
||||||
if do_analyze
|
if do_analyze
|
||||||
data[:times].each do | time, time_data |
|
data[:times].each do | time, time_data |
|
||||||
|
Loading…
x
Reference in New Issue
Block a user