Fixed strange RecordReadOnly exception in task done.
This commit is contained in:
parent
cabcd201a6
commit
0fcd5abb3a
2 changed files with 2 additions and 1 deletions
|
|
@ -99,7 +99,7 @@ class Task < ActiveRecord::Base
|
|||
|
||||
def update_ordergroup_stats
|
||||
if done
|
||||
users.each { |u| u.ordergroup.update_stats! if u.ordergroup }
|
||||
Ordergroup.joins(:users).where(users: {id: user_ids}).each(&:update_stats!)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue