mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
Make sure nil IDs to not get cast to empty string in REST API (#5068)
This commit is contained in:
parent
dae0af1fd2
commit
adc38078dd
@ -9,7 +9,7 @@ class REST::ApplicationSerializer < ActiveModel::Serializer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def client_id
|
def client_id
|
||||||
object.uid.to_s
|
object.uid
|
||||||
end
|
end
|
||||||
|
|
||||||
def client_secret
|
def client_secret
|
||||||
|
@ -24,11 +24,11 @@ class REST::StatusSerializer < ActiveModel::Serializer
|
|||||||
end
|
end
|
||||||
|
|
||||||
def in_reply_to_id
|
def in_reply_to_id
|
||||||
object.in_reply_to_id.to_s
|
object.in_reply_to_id&.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def in_reply_to_account_id
|
def in_reply_to_account_id
|
||||||
object.in_reply_to_account_id.to_s
|
object.in_reply_to_account_id&.to_s
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_user?
|
def current_user?
|
||||||
|
Loading…
Reference in New Issue
Block a user