Skip to content
Extraits de code Groupes Projets
Valider adc38078 rédigé par Eugen Rochko's avatar Eugen Rochko Validation de GitHub
Parcourir les fichiers

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

parent dae0af1f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -9,7 +9,7 @@ class REST::ApplicationSerializer < ActiveModel::Serializer ...@@ -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 ...@@ -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?
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter