Browse Source

修改version_releases中version_id为空的时候出现的错误

tags/v1
sylor_huang@126.com 6 years ago
parent
commit
465594eaaf
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      app/views/version_releases/index.json.jbuilder

+ 2
- 1
app/views/version_releases/index.json.jbuilder View File

@@ -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


Loading…
Cancel
Save