Skip to content

Commit

Permalink
add check for nil team_id in team method
Browse files Browse the repository at this point in the history
  • Loading branch information
ameyagv committed Sep 7, 2023
1 parent b61fd6c commit eb02615
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/assignment_team.rb
Expand Up @@ -217,6 +217,9 @@ def self.team(participant)
return nil unless teams_users

teams_users.each do |teams_user|
if teams_user.team_id == nil
next
end
team = Team.find(teams_user.team_id)
return team if team.parent_id == participant.parent_id
end
Expand Down

0 comments on commit eb02615

Please sign in to comment.