From 102466ac5842b20f32a9c5e2fa3f35414c34574b Mon Sep 17 00:00:00 2001 From: unarist Date: Sat, 8 Jul 2017 21:50:45 +0900 Subject: Fix JSON serialization of media_attachment (#4111) --- app/serializers/rest/media_attachment_serializer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/serializers/rest') 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 -- cgit