about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorunarist <m.unarist@gmail.com>2017-07-08 21:50:45 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-07-08 14:50:45 +0200
commit102466ac5842b20f32a9c5e2fa3f35414c34574b (patch)
tree70a1206c4b93439e2857cf82f67de6edb2c82380 /app
parent63b77f23202a6dece419e2eb7180395b2e276b09 (diff)
Fix JSON serialization of media_attachment (#4111)
Diffstat (limited to 'app')
-rw-r--r--app/serializers/rest/media_attachment_serializer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/serializers/rest/media_attachment_serializer.rb b/app/serializers/rest/media_attachment_serializer.rb
index 9b07a686e..9055b8db4 100644
--- a/app/serializers/rest/media_attachment_serializer.rb
+++ b/app/serializers/rest/media_attachment_serializer.rb
@@ -15,7 +15,7 @@ class REST::MediaAttachmentSerializer < ActiveModel::Serializer
   end
 
   def text_url
-    medium_url(object.id)
+    object.local? ? medium_url(object) : nil
   end
 
   def meta