BUGFIX: system user needs no drafts.
This commit is contained in:
parent
d5d1473ced
commit
48790368a0
|
@ -201,8 +201,10 @@ module Discourse
|
||||||
user ||= User.admins.real.order(:id).first
|
user ||= User.admins.real.order(:id).first
|
||||||
end
|
end
|
||||||
|
|
||||||
|
SYSTEM_USER_ID = -1
|
||||||
|
|
||||||
def self.system_user
|
def self.system_user
|
||||||
User.find_by(id: -1)
|
User.find_by(id: SYSTEM_USER_ID)
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.store
|
def self.store
|
||||||
|
|
|
@ -25,7 +25,7 @@ class PostRevisor
|
||||||
update_topic_excerpt
|
update_topic_excerpt
|
||||||
post_process_post
|
post_process_post
|
||||||
update_topic_word_counts
|
update_topic_word_counts
|
||||||
@post.advance_draft_sequence
|
@post.advance_draft_sequence unless editor.id == Discourse::SYSTEM_USER_ID
|
||||||
PostAlerter.new.after_save_post(@post)
|
PostAlerter.new.after_save_post(@post)
|
||||||
publish_revision
|
publish_revision
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue