From 275dad97024d010853d995350b5224c0a3edc400 Mon Sep 17 00:00:00 2001 From: rinsuki <428rinsuki+git@gmail.com> Date: Tue, 5 Apr 2022 19:00:31 +0900 Subject: [PATCH] fix: returns nil instead of empty URL on status.application.website (#17962) --- app/serializers/rest/status_serializer.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index 32c4e405ef..6bd6a23e51 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -137,6 +137,10 @@ class REST::StatusSerializer < ActiveModel::Serializer class ApplicationSerializer < ActiveModel::Serializer attributes :name, :website + + def website + object.website.presence + end end class MentionSerializer < ActiveModel::Serializer