mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Changing owner of small action post failed
Small action posts for invites (CC from email) have a blank raw and revising of posts with blank raw didn't work anymore.
This commit is contained in:
@@ -121,8 +121,6 @@ class PostRevisor
|
||||
|
||||
@topic_changes = TopicChanges.new(@topic, editor)
|
||||
|
||||
return false if @fields.has_key?(:raw) && @fields[:raw].blank?
|
||||
|
||||
# some normalization
|
||||
@fields[:raw] = cleanup_whitespaces(@fields[:raw]) if @fields.has_key?(:raw)
|
||||
@fields[:user_id] = @fields[:user_id].to_i if @fields.has_key?(:user_id)
|
||||
@@ -207,7 +205,7 @@ class PostRevisor
|
||||
end
|
||||
|
||||
def cleanup_whitespaces(raw)
|
||||
TextCleaner.normalize_whitespaces(raw).gsub(/\s+\z/, "")
|
||||
raw.present? ? TextCleaner.normalize_whitespaces(raw).gsub(/\s+\z/, "") : ""
|
||||
end
|
||||
|
||||
def should_revise?
|
||||
|
Reference in New Issue
Block a user