fix: returns nil instead of empty URL on status.application.website (#17962)

lolsob-rspec
rinsuki 2022-04-05 19:00:31 +09:00 committed by GitHub
parent 07f1888854
commit a4fa33f2be
1 changed files with 4 additions and 0 deletions

View File

@ -137,6 +137,10 @@ class REST::StatusSerializer < ActiveModel::Serializer
class ApplicationSerializer < ActiveModel::Serializer class ApplicationSerializer < ActiveModel::Serializer
attributes :name, :website attributes :name, :website
def website
object.website.presence
end
end end
class MentionSerializer < ActiveModel::Serializer class MentionSerializer < ActiveModel::Serializer