FIX projects fork users bug

This commit is contained in:
Jasder 2020-08-15 10:58:56 +08:00
parent bd9f32cfaa
commit 90f14d2051
1 changed files with 4 additions and 3 deletions

View File

@ -1,12 +1,13 @@
json.count @forks_count
json.users do
json.users do
json.array! @fork_users.each do |f|
user = f.user
user = f.user
fork_project = Project.select(:id,:name).find_by(id: f.fork_project_id)
json.id f.fork_project_id
json.identifier fork_project.identifier
json.name "#{user.try(:show_real_name)}/#{fork_project.try(:name)}"
json.login user.try(:login)
json.image_url url_to_avatar(user)
json.format_time f.created_at.strftime("%Y-%m-%d")
end
end
end