From 102466ac5842b20f32a9c5e2fa3f35414c34574b Mon Sep 17 00:00:00 2001 From: unarist Date: Sat, 8 Jul 2017 21:50:45 +0900 Subject: [PATCH] Fix JSON serialization of media_attachment (#4111) --- app/serializers/rest/media_attachment_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/serializers/rest/media_attachment_serializer.rb b/app/serializers/rest/media_attachment_serializer.rb index 9b07a686ef..9055b8db47 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