From: Go MAEDA Date: Thu, 1 Apr 2021 15:45:23 +0000 (+0000) Subject: Rails 6.1: fix set roleids (#29914, #32935). X-Git-Tag: 5.0.0~460 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=268b474f53eddba386094272af456228aba4758a;p=redmine.git Rails 6.1: fix set roleids (#29914, #32935). Patch by Pavel Rosický. git-svn-id: http://svn.redmine.org/redmine/trunk@20899 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/member.rb b/app/models/member.rb index f7b4038f5..5cf7620de 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -76,6 +76,8 @@ class Member < ActiveRecord::Base if member_roles_to_destroy.any? member_roles_to_destroy.each(&:destroy) end + member_roles.reload + super(ids) end def <=>(member)