diff options
author | rinsuki <428rinsuki+git@gmail.com> | 2022-04-05 19:00:31 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-05 12:00:31 +0200 |
commit | 275dad97024d010853d995350b5224c0a3edc400 (patch) | |
tree | a466da71bd88accfab8903c3ce022ed6771909a8 /app/serializers | |
parent | 0ec695e036dab45d57598f451266bd0b176df9fd (diff) |
fix: returns nil instead of empty URL on status.application.website (#17962)
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/rest/status_serializer.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index 32c4e405e..6bd6a23e5 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 |