FIX: Conflict error (version was already used)

This commit is contained in:
Robin Ward 2019-05-03 16:36:37 -04:00
parent e8fafbc123
commit 99a2a769d4
2 changed files with 7 additions and 3 deletions

View File

@ -4,7 +4,7 @@ import { historyHeat } from "discourse/widgets/post-edits-indicator";
import showModal from "discourse/lib/show-modal";
export default Ember.Component.extend({
hasEdits: Ember.computed.gt("reviewable.version", 1),
hasEdits: Ember.computed.gt("reviewable.post_version", 1),
@computed("reviewable.post_updated_at")
historyClass(updatedAt) {

View File

@ -1,6 +1,10 @@
class ReviewableFlaggedPostSerializer < ReviewableSerializer
target_attributes :cooked, :raw, :reply_count, :version
attributes :blank_post, :post_updated_at
target_attributes :cooked, :raw, :reply_count
attributes :blank_post, :post_updated_at, :post_version
def post_version
object.target&.version
end
def post_updated_at
object.target&.updated_at