Fixed conflit error where workshops would have errors with themselves
This commit is contained in:
parent
9ca712ebc7
commit
ec03ff3959
@ -37,8 +37,8 @@ module ScheduleHelper
|
|||||||
|
|
||||||
if conflict.present?
|
if conflict.present?
|
||||||
w_conflict = get_workshop(conflict, @workshops, @events)
|
w_conflict = get_workshop(conflict, @workshops, @events)
|
||||||
workshop_errors[(w_conflict.is_a?(Workshop) ? 'w' : 'e') + w_conflict.id.to_s] = "Time conflict with “<strong>#{w_conflict.title}</strong>”".html_safe
|
workshop_errors[(w_conflict.is_a?(Workshop) ? 'w' : 'e') + w_conflict.id.to_s] = "Time conflict with “<strong>#{w.title}</strong>”".html_safe
|
||||||
workshop_errors[(w.is_a?(Workshop) ? 'w' : 'e') + w.id.to_s] = "Time conflict with “<strong>#{w.title}</strong>”".html_safe
|
workshop_errors[(w.is_a?(Workshop) ? 'w' : 'e') + w.id.to_s] = "Time conflict with “<strong>#{w_conflict.title}</strong>”".html_safe
|
||||||
errors += 1 if workshop_errors[(w_conflict.is_a?(Workshop) ? 'w' : 'e') + w_conflict.id.to_s].nil?
|
errors += 1 if workshop_errors[(w_conflict.is_a?(Workshop) ? 'w' : 'e') + w_conflict.id.to_s].nil?
|
||||||
else
|
else
|
||||||
schedule[day][:start_time] = hour if schedule[day][:start_time].nil? || hour < schedule[day][:start_time]
|
schedule[day][:start_time] = hour if schedule[day][:start_time].nil? || hour < schedule[day][:start_time]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user