项目资源统计为负数
This commit is contained in:
parent
184e0ee689
commit
945d0a933f
|
@ -29,7 +29,6 @@ class AdminController < ApplicationController
|
|||
|
||||
def index
|
||||
@no_configuration_data = Redmine::DefaultData::Loader::no_data?
|
||||
@lastest_login_user_count = User.all.count
|
||||
end
|
||||
|
||||
def projects
|
||||
|
|
|
@ -1633,6 +1633,9 @@ class UsersController < ApplicationController
|
|||
attach_copied_obj.attachtype = 1
|
||||
end
|
||||
attach_copied_obj.save
|
||||
unless Project.find(project_id).project_score.nil?
|
||||
Project.find(project_id).project_score.update_attribute(:attach_num, Project.find(project_id).project_score.attach_num + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
elsif params[:send_ids].present?
|
||||
|
@ -1668,6 +1671,9 @@ class UsersController < ApplicationController
|
|||
attach_copied_obj.attachtype = 1
|
||||
end
|
||||
attach_copied_obj.save
|
||||
unless Project.find(project_id).project_score.nil?
|
||||
Project.find(project_id).project_score.update_attribute(:attach_num, Project.find(project_id).project_score.attach_num + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1371,6 +1371,7 @@ ActiveRecord::Schema.define(:version => 20160122143138) do
|
|||
t.integer "changeset_num", :default => 0
|
||||
t.integer "board_message_num", :default => 0
|
||||
t.integer "board_num", :default => 0
|
||||
t.integer "act_num", :default => 0
|
||||
t.integer "attach_num", :default => 0
|
||||
t.datetime "commit_time"
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue