diff --git a/app/controllers/polls_controller.rb b/app/controllers/polls_controller.rb index 08d0da42f..bfa96bccf 100644 --- a/app/controllers/polls_controller.rb +++ b/app/controllers/polls_controller.rb @@ -792,12 +792,12 @@ class PollsController < ApplicationController if the_group_setting_status == 2 poll_group_params = { :publish_time => the_group_setting.publish_time, - :end_time => poll_end_time + :end_time => poll_end_time < Time.now ? the_group_setting.end_time : poll_end_time } elsif the_group_setting_status == 3 poll_group_params = { :publish_time => the_group_setting.publish_time, - :end_time => the_group_setting.end_time + :end_time => exercise_end_time } end the_group_setting.update_attributes(poll_group_params)