include state in team detail context vars
This commit is contained in:
parent
3998fe3369
commit
4f888ffd57
1 changed files with 3 additions and 1 deletions
|
@ -9,9 +9,11 @@ from symposion.teams.models import Team
|
||||||
@login_required
|
@login_required
|
||||||
def team_detail(request, slug):
|
def team_detail(request, slug):
|
||||||
team = get_object_or_404(Team, slug=slug)
|
team = get_object_or_404(Team, slug=slug)
|
||||||
if team.access == "invitation" and team.get_state_for_user(request.user) is None:
|
state = team.get_state_for_user(request.user)
|
||||||
|
if team.access == "invitation" and state is None:
|
||||||
raise Http404()
|
raise Http404()
|
||||||
|
|
||||||
return render(request, "teams/team_detail.html", {
|
return render(request, "teams/team_detail.html", {
|
||||||
"team": team,
|
"team": team,
|
||||||
|
"state": state,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue