summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-27 06:09:51 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-27 06:09:51 +0000
commita59d305223365cb31bb670f134383d6ff316a13e (patch)
treef3be1afa29fca783ec0e94eaba41a4884d146ef8 /app
parent19ae126005d36803c1d273334c3eac91881c071c (diff)
downloadgitlab-ce-a59d305223365cb31bb670f134383d6ff316a13e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/helpers/members_helper.rb13
1 files changed, 12 insertions, 1 deletions
diff --git a/app/helpers/members_helper.rb b/app/helpers/members_helper.rb
index 11d5591d509..31995c27fac 100644
--- a/app/helpers/members_helper.rb
+++ b/app/helpers/members_helper.rb
@@ -15,7 +15,18 @@ module MembersHelper
elsif member.invite?
"revoke the invitation for #{member.invite_email} to join"
else
- "remove #{member.user.name} from"
+ if member.user
+ "remove #{member.user.name} from"
+ else
+ e = RuntimeError.new("Data integrity error: no associated user for member ID #{member.id}")
+ Gitlab::ErrorTracking.track_exception(e,
+ member_id: member.id,
+ invite_email: member.invite_email,
+ invite_accepted_at: member.invite_accepted_at,
+ source_id: member.source_id,
+ source_type: member.source_type)
+ "remove this orphaned member from"
+ end
end
"#{text} #{action} the #{member.source.human_name} #{source_text(member)}?"