From 411d7e7dce235bc6f0573c7facf4ca6496890420 Mon Sep 17 00:00:00 2001 From: Ludovic Stephan Date: Thu, 29 Oct 2020 11:13:39 +0100 Subject: [PATCH] =?UTF-8?q?On=20peut=20revendre=20une=20place=20qu'on=20a?= =?UTF-8?q?=20pay=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bda/forms.py | 2 +- bda/templates/bda/revente/notpaid.html | 6 ------ bda/views.py | 6 ------ 3 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 bda/templates/bda/revente/notpaid.html diff --git a/bda/forms.py b/bda/forms.py index bb79932e..f0cea1bd 100644 --- a/bda/forms.py +++ b/bda/forms.py @@ -77,7 +77,7 @@ class ResellForm(forms.Form): super().__init__(*args, **kwargs) self.fields["attributions"] = TemplateLabelField( queryset=participant.attribution_set.filter( - spectacle__date__gte=timezone.now() + spectacle__date__gte=timezone.now(), paid=True ) .exclude(revente__seller=participant) .select_related("spectacle", "spectacle__location", "participant__user"), diff --git a/bda/templates/bda/revente/notpaid.html b/bda/templates/bda/revente/notpaid.html deleted file mode 100644 index 0dd4e4df..00000000 --- a/bda/templates/bda/revente/notpaid.html +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "base_title.html" %} - -{% block realcontent %} -

Nope

-

Avant de revendre des places, il faut aller les payer !

-{% endblock %} diff --git a/bda/views.py b/bda/views.py index c17b723d..a6fb1804 100644 --- a/bda/views.py +++ b/bda/views.py @@ -385,12 +385,6 @@ def revente_manage(request, tirage_id): user=request.user, tirage=tirage ) - # If the participant has just been created, the `paid` field is not - # automatically added by our custom ObjectManager. Skip the check in this - # scenario. - if not created and not participant.paid: - return render(request, "bda/revente/notpaid.html", {}) - resellform = ResellForm(participant, prefix="resell") annulform = AnnulForm(participant, prefix="annul") soldform = SoldForm(participant, prefix="sold")