Skip to content
Snippets Groups Projects
Commit adc38078 authored by Eugen Rochko's avatar Eugen Rochko Committed by GitHub
Browse files

Make sure nil IDs to not get cast to empty string in REST API (#5068)

parent dae0af1f
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ class REST::ApplicationSerializer < ActiveModel::Serializer
end
def client_id
object.uid.to_s
object.uid
end
def client_secret
......
......@@ -24,11 +24,11 @@ class REST::StatusSerializer < ActiveModel::Serializer
end
def in_reply_to_id
object.in_reply_to_id.to_s
object.in_reply_to_id&.to_s
end
def in_reply_to_account_id
object.in_reply_to_account_id.to_s
object.in_reply_to_account_id&.to_s
end
def current_user?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment