diff --git a/app/models/user_score.rb b/app/models/user_score.rb index 1635d612f..6371fc12d 100644 --- a/app/models/user_score.rb +++ b/app/models/user_score.rb @@ -53,7 +53,7 @@ class UserScore < ActiveRecord::Base user_score = current_user.user_score_attr user_grade = nil #项目个人得分 project = obj.project - unless project.nil? && project.project_type == 0 + unless project.nil? user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id) if user_grade.nil? user_grade = UserGrade.create(:user_id => current_user.id,:project_id => project.id) @@ -178,7 +178,7 @@ class UserScore < ActiveRecord::Base current_user_grade = nil #项目个人得分 target_user_grade = nil project = obj.project - unless project.nil? && project.project_type == 0 + unless project.nil? current_user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id) target_user_grade = UserGrade.find_by_user_id_and_project_id(target_user.id, project.id) if current_user_grade.nil? @@ -285,7 +285,7 @@ class UserScore < ActiveRecord::Base user_score = current_user.try(:user_score_attr) user_grade = nil #项目个人得分 project = obj.project - unless project.nil? && project.project_type == 0 + unless project.nil? user_grade = UserGrade.find_by_user_id_and_project_id(current_user.id, project.id) if user_grade.nil? user_grade = UserGrade.create(:user_id => current_user.id,:project_id => project.id) diff --git a/app/views/layouts/base_users.html.erb b/app/views/layouts/base_users.html.erb index 5579dfb5b..0f7c273f1 100644 --- a/app/views/layouts/base_users.html.erb +++ b/app/views/layouts/base_users.html.erb @@ -35,7 +35,7 @@ -
+