dev_course
SylorHuang 6 years ago
parent 49a3aa33b2
commit 13f1d15b33

@ -144,7 +144,7 @@ class Exercise < ApplicationRecord
pb_time = publish_time
en_time = end_time
if end_time <= Time.now && exercise_status != 3
if en_time.present? && (en_time <= Time.now) && (exercise_status != 3)
update_column("exercise_status",3)
end
else

Loading…
Cancel
Save