mirror of
https://github.com/discourse/discourse.git
synced 2026-08-26 21:27:16 -05:00
FIX: Category description topics shouldn't auto-close
This commit is contained in:
@@ -151,6 +151,7 @@ SQL
|
||||
def create_category_definition
|
||||
t = Topic.new(title: I18n.t("category.topic_prefix", category: name), user: user, pinned_at: Time.now, category_id: id)
|
||||
t.skip_callbacks = true
|
||||
t.auto_close_days = nil
|
||||
t.save!
|
||||
update_column(:topic_id, t.id)
|
||||
t.posts.create(raw: post_template, user: user)
|
||||
|
||||
+1
-1
@@ -605,7 +605,7 @@ class Topic < ActiveRecord::Base
|
||||
# TODO: change this method, along with category's auto_close_days. Use hours.
|
||||
def auto_close_days=(num_days)
|
||||
@ignore_category_auto_close = true
|
||||
set_auto_close(num_days * 24)
|
||||
set_auto_close( num_days ? num_days * 24 : nil)
|
||||
end
|
||||
|
||||
def self.auto_close
|
||||
|
||||
Reference in New Issue
Block a user