Skip to content

Commit

Permalink
chore: fixed incorrect error
Browse files Browse the repository at this point in the history
  • Loading branch information
brwali committed Oct 27, 2024
1 parent 562e78e commit a3855e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/team.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand All @@ -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
Expand Down

0 comments on commit a3855e8

Please sign in to comment.