From a2ee323fa41d614374ea67c1cf5a07a3c28bf6f1 Mon Sep 17 00:00:00 2001 From: Leonhard Strohmidel Date: Tue, 20 Sep 2022 11:59:51 +0200 Subject: [PATCH] Removing Expireable from PlaceVote --- django_lostplaces/lostplaces/views/place_views.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/django_lostplaces/lostplaces/views/place_views.py b/django_lostplaces/lostplaces/views/place_views.py index a1f83be..86bdfa5 100644 --- a/django_lostplaces/lostplaces/views/place_views.py +++ b/django_lostplaces/lostplaces/views/place_views.py @@ -221,12 +221,11 @@ class PlaceVoteView(IsEligibleToSeePlaceMixin, View): voting = PlaceVoting.objects.create( submitted_by=explorer, place=place, - vote=vote, - expires_when=timezone.now()+self.delta + vote=vote ) messages.success(self.request, _('Vote submitted')) else: - voting.expires_when=timezone.now()+self.delta + voting.submitted_when = timezone.now() voting.vote = vote messages.success(self.request, _('Your vote has been update'))