From 144e75edb237e94313bb9e1fc69c47781e72bd74 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Wed, 19 Jul 2017 11:57:23 +0200 Subject: Refs 4131 Change Timetable#create to fetch all Calendars (new_from) --- app/controllers/time_tables_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/time_tables_controller.rb') diff --git a/app/controllers/time_tables_controller.rb b/app/controllers/time_tables_controller.rb index 20d500ea9..b7fb2bf9b 100644 --- a/app/controllers/time_tables_controller.rb +++ b/app/controllers/time_tables_controller.rb @@ -37,7 +37,7 @@ class TimeTablesController < ChouetteController tt_params = time_table_params if tt_params[:calendar_id] %i(monday tuesday wednesday thursday friday saturday sunday).map { |d| tt_params[d] = true } - calendar = current_organisation.calendars.find_by_id(tt_params[:calendar_id]) + calendar = Calendar.find(tt_params[:calendar_id]) tt_params[:calendar_id] = nil if tt_params.has_key?(:dates_attributes) || tt_params.has_key?(:periods_attributes) end -- cgit v1.2.3