From 91a2750084a474a62fe2a61c43b91f6f9396b2d0 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Mon, 14 Mar 2016 20:31:50 -0400 Subject: [PATCH] Advance draft sequence in PostRevisor if edit contains no changes Simplest version of the server-side fix for https://meta.discourse.org/t/draft-not-cleared-properly-when-empty-edit- of-post-is-saved/40939 --- lib/post_revisor.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/post_revisor.rb b/lib/post_revisor.rb index 873be66e0d2..ccd16c08781 100644 --- a/lib/post_revisor.rb +++ b/lib/post_revisor.rb @@ -154,6 +154,7 @@ class PostRevisor POST_TRACKED_FIELDS.each do |field| return true if @fields.has_key?(field) && @fields[field] != @post.send(field) end + advance_draft_sequence false end