Fix voting user delete deletes also entries for past events
This commit is contained in:
parent
d9ad9c1a80
commit
9e0f703434
@ -90,7 +90,10 @@ def voting(request: HttpRequest) -> django.http.HttpResponse:
|
||||
|
||||
# handle delete
|
||||
if request.POST["deleteClicked"] == "1":
|
||||
VotingUser.objects.filter(name=name, modify_key=modify_key).delete()
|
||||
EventDateVote.objects.filter(
|
||||
date__event__active=True,
|
||||
voter__name=name,
|
||||
voter__modify_key=modify_key).delete()
|
||||
return HttpResponseRedirect(reverse("events"))
|
||||
|
||||
# handle normal voting
|
||||
|
Loading…
Reference in New Issue
Block a user