Fix crash in StatusEdit serializer when quote posts are involved (#35036)
This commit is contained in:
1 parent
e28f86cbe5
commit
e8868af079
1 file changed
+1
-1
@@ -23,6 +23,6 @@ class REST::StatusEditSerializer < ActiveModel::Serializer
|
||||
end
|
||||
|
||||
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
|
||||
Reference in new issue
Block a user