Fix crash in StatusEdit serializer when quote posts are involved (#35036)

pull/35038/head
Claire 5 months ago committed by GitHub
parent e28f86cbe5
commit e8868af079
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -23,6 +23,6 @@ class REST::StatusEditSerializer < ActiveModel::Serializer
end end
def quote def quote
object.quote_id == status.quote&.id ? status.quote : Quote.new(state: :pending) object.quote_id == object.status.quote&.id ? object.status.quote : Quote.new(state: :pending)
end end
end end

Loading…
Cancel
Save