about summary refs log tree commit diff
path: root/app/serializers/rest
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2018-01-04 23:36:55 +0900
committerEugen Rochko <eugen@zeonfederated.com>2018-01-04 15:36:55 +0100
commit3c189642561f27925803448059e212718e4a2497 (patch)
tree31bdc4fb92b0e31d0ae2ec64856c4f75e4ba3028 /app/serializers/rest
parentc61dd918a24761b7a96cb9e65e6943238f630715 (diff)
Fallback default thumbnail in instance status API (#6177)
Diffstat (limited to 'app/serializers/rest')
-rw-r--r--app/serializers/rest/instance_serializer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/rest/instance_serializer.rb b/app/serializers/rest/instance_serializer.rb
index 2898011fd..ae1dbe6b5 100644
--- a/app/serializers/rest/instance_serializer.rb
+++ b/app/serializers/rest/instance_serializer.rb
@@ -27,7 +27,7 @@ class REST::InstanceSerializer < ActiveModel::Serializer
   end
 
   def thumbnail
-    full_asset_url(instance_presenter.thumbnail.file.url) if instance_presenter.thumbnail
+    instance_presenter.thumbnail ? full_asset_url(instance_presenter.thumbnail.file.url) : full_pack_url('preview.jpg')
   end
 
   def stats