From a3855e8fecbe49b5b9bae3a31d8b380ab10ee628 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sat, 26 Oct 2024 22:48:26 -0400 Subject: [PATCH] chore: fixed incorrect error --- app/models/team.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/team.rb b/app/models/team.rb index 9bb726cdb94..1b2259743b7 100755 --- a/app/models/team.rb +++ b/app/models/team.rb @@ -78,7 +78,7 @@ def full? # Add member to the team, changed to hash by E1776 def add_member(user, _assignment_id = nil) - raise "The user #{user.name} is already a member of the team #{name}" if user?(user) + raise "The user #{user.username} is already a member of the team #{name}" if user?(user) can_add_member = false unless full? @@ -87,7 +87,7 @@ def add_member(user, _assignment_id = nil) parent = TeamNode.find_by(node_object_id: id) TeamUserNode.create(parent_id: parent.id, node_object_id: t_user.id) add_participant(parent_id, user) - ExpertizaLogger.info LoggerMessage.new('Model:Team', user.name, "Added member to the team #{id}") + ExpertizaLogger.info LoggerMessage.new('Model:Team', user.username, "Added member to the team #{id}") end can_add_member end