diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/concerns/mentionable.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/concerns/mentionable.rb b/app/models/concerns/mentionable.rb index 5858fe1bb6f..a46a593c6e3 100644 --- a/app/models/concerns/mentionable.rb +++ b/app/models/concerns/mentionable.rb @@ -50,7 +50,7 @@ module Mentionable matches.each do |match| identifier = match.delete "@" if has_project - id = project.team.members.find { |u| u.username == identifier }.try(:id) + id = project.team.members.find_by(username: identifier).try(:id) else id = User.where(username: identifier).pluck(:id).first end |