summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-04-14 00:54:50 +0000
committerGo MAEDA <maeda@farend.jp>2023-04-14 00:54:50 +0000
commit340736601770808a4df8be817e980f5f5bd3b84b (patch)
treec5ead0314271aad6752a5dcc69c128f238c2d639 /app
parente16a11a22aad8a732d6637365ececfd4d8f5bc12 (diff)
downloadredmine-340736601770808a4df8be817e980f5f5bd3b84b.tar.gz
redmine-340736601770808a4df8be817e980f5f5bd3b84b.zip
Merged r22182 from trunk to 5.0-stable (#37166).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@22183 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/member_role.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/member_role.rb b/app/models/member_role.rb
index 94c6615a2..a20531f94 100644
--- a/app/models/member_role.rb
+++ b/app/models/member_role.rb
@@ -52,7 +52,7 @@ class MemberRole < ActiveRecord::Base
private
def remove_member_if_empty
- if @member_removal != false && member.roles.empty?
+ if @member_removal != false && member.roles.reload.empty?
member.destroy
end
end