Fixed nil object error on Schedule page

This commit is contained in:
Godwin 2016-07-18 10:20:46 -07:00 committed by GitHub
parent be50d165b3
commit 21377e5e9f

View File

@ -462,7 +462,7 @@ class ApplicationController < LinguaFrancaApplicationController
def get_scheule_data(do_analyze = true) def get_scheule_data(do_analyze = true)
conference = @this_conference || @conference conference = @this_conference || @conference
@meals = Hash[conference.meals.map{ |k, v| [k.to_i, v] }].sort.to_h @meals = Hash[(conference.meals || {}).map{ |k, v| [k.to_i, v] }].sort.to_h
@events = Event.where(:conference_id => conference.id).order(start_time: :asc) @events = Event.where(:conference_id => conference.id).order(start_time: :asc)
@workshops = Workshop.where(:conference_id => conference.id).order(start_time: :asc) @workshops = Workshop.where(:conference_id => conference.id).order(start_time: :asc)
@locations = {} @locations = {}