From 11b19cbacef14c0fe24e68b5862c3bf2fba76a4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Wed, 1 Mar 2023 22:07:49 +0100 Subject: [PATCH] Exclude refunded purchases from start session form --- games/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games/forms.py b/games/forms.py index 66c6c79..d7ca8b2 100644 --- a/games/forms.py +++ b/games/forms.py @@ -10,7 +10,7 @@ custom_datetime_widget = forms.DateTimeInput( class SessionForm(forms.ModelForm): purchase = forms.ModelChoiceField( - queryset=Purchase.objects.order_by("edition__name") + queryset=Purchase.objects.filter(date_refunded=None).order_by("edition__name") ) class Meta: