test docu, non fonctionnel pour l'instant
CI - Security, Lint & Tests / validate (push) Failing after 1m7s
CI - Security, Lint & Tests / validate (push) Failing after 1m7s
This commit is contained in:
@@ -32,14 +32,14 @@ def user_org_team_ids(user):
|
||||
relationships (many-to-many *and* legacy single column) for staff. An
|
||||
admin or a scout belongs to none, regardless of how many teams exist.
|
||||
"""
|
||||
from app.permissions import coach_org_team_ids, manager_org_team_ids
|
||||
from app.permissions import coach_org_teams, manager_org_teams
|
||||
|
||||
if isinstance(user, Player):
|
||||
return [tp.org_team_id for tp in user.team_placements]
|
||||
if isinstance(user, Coach):
|
||||
return coach_org_team_ids(user)
|
||||
return [team.id for team in coach_org_teams(user)]
|
||||
if isinstance(user, Manager):
|
||||
return manager_org_team_ids(user)
|
||||
return [team.id for team in manager_org_teams(user)]
|
||||
return []
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user