From 9bbb1e0f906c64bb1520cf6cc6b1da0a7a37a0ae Mon Sep 17 00:00:00 2001 From: huang Date: Thu, 14 Jan 2016 20:48:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9fork=E6=97=B6=E5=80=99?= =?UTF-8?q?=E9=A1=B9=E7=9B=AEID=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 0a9de787a..cafec1c62 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -122,8 +122,8 @@ class RepositoriesController < ApplicationController if project.save r = Role.givable.find_by_id(Setting.new_project_user_role_id.to_i) || Role.givable.first m = Member.new(:user => User.current, :roles => [r]) - if ProjectScore.where("project_id=?", @project.id).first.nil? - ProjectScore.create(:project_id => @project.id, :score => false) + if ProjectScore.where("project_id=?", project.id).first.nil? + ProjectScore.create(:project_id => project.id, :score => false) end project_info = ProjectInfo.new(:user_id => User.current.id, :project_id => project.id) user_grades = UserGrade.create(:user_id => User.current.id, :project_id => project.id)