Minor follow-up bug fix for 5ff6c10.

This commit is contained in:
Guo Xiang Tan
2020-08-26 17:24:18 +08:00
parent c792f36966
commit dbfb2a1e11
2 changed files with 18 additions and 5 deletions

View File

@ -126,7 +126,7 @@ class TopicTimer < ActiveRecord::Base
end
def schedule_auto_open_job(time)
topic.update_status('closed', true, user) if !topic&.closed
topic.update_status('closed', true, user) if topic && !topic.closed
Jobs.enqueue_at(time, :toggle_topic_closed,
topic_timer_id: id,