Skip to content

Commit

Permalink
chore: added logic to accomendate the dual use of add_member
Browse files Browse the repository at this point in the history
  • Loading branch information
brwali committed Oct 27, 2024
1 parent 414b124 commit 14cb320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion 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)
username = user?(user) ? user.username : user.name
username = user.method_defined? :username ? user.username : user.name
raise "The user #{username} is already a member of the team #{name}" if user?(user)

can_add_member = false
Expand Down

0 comments on commit 14cb320

Please sign in to comment.