Intitial teams support #147

Merged
Oleg-Komarov merged 34 commits from teams-support into main 2024-05-23 19:43:54 +02:00
Showing only changes of commit 77828287bf - Show all commits

View File

@ -22,7 +22,8 @@ class LeaveTeamView(LoginRequiredMixin, DetailView):
def post(self, request, *args, **kwargs): def post(self, request, *args, **kwargs):
team = self.get_object() team = self.get_object()
team_user = TeamsUsers.objects.filter(team=team, user=self.request.user).first() team_user = TeamsUsers.objects.filter(team=team, user=self.request.user).first()
team_user.delete() if team_user:
team_user.delete()
return redirect('teams:list') return redirect('teams:list')
def get_context_data(self, **kwargs): def get_context_data(self, **kwargs):