From 465594eaaf81f104447a3ebfdf19232b910d4c8d Mon Sep 17 00:00:00 2001 From: "sylor_huang@126.com" Date: Wed, 20 May 2020 15:22:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9version=5Freleases=E4=B8=ADve?= =?UTF-8?q?rsion=5Fid=E4=B8=BA=E7=A9=BA=E7=9A=84=E6=97=B6=E5=80=99?= =?UTF-8?q?=E5=87=BA=E7=8E=B0=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/version_releases/index.json.jbuilder | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/version_releases/index.json.jbuilder b/app/views/version_releases/index.json.jbuilder index 6c69fca03..4df262261 100644 --- a/app/views/version_releases/index.json.jbuilder +++ b/app/views/version_releases/index.json.jbuilder @@ -38,8 +38,9 @@ json.releases do json.image_url user.present? ? url_to_avatar(user) : "" end end + json.attachments do - json.array! version.attachments do |attachment| + json.array! version.try(:attachments) do |attachment| json.partial! "attachments/attachment_simple", locals: {attachment: attachment} end end