Skip to content

Commit

Permalink
Fix team with name used in other tournament
Browse files Browse the repository at this point in the history
  • Loading branch information
floflo0 committed Dec 9, 2024
1 parent 37191ab commit a86b3cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion insalan/tournament/views/team.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def post(self, request, *args, **kwargs):
}
)

if self.queryset.filter(name__exact=request.data["name"]).exists():
if self.queryset.filter(name__exact=request.data["name"], tournament=request.data["tournament"]).exists():
return Response({
"name": _("Ce nom d'équipe est déjà pris.")
}, status=status.HTTP_400_BAD_REQUEST)
Expand Down

0 comments on commit a86b3cd

Please sign in to comment.