fixes + deprecated migration

This commit is contained in:
Ludovic Stephan 2016-09-05 02:38:46 +02:00
parent 3bc9880db1
commit de522a0035
3 changed files with 5 additions and 41 deletions

View file

@ -8,6 +8,7 @@ from datetime import timedelta
from django import forms
from django.forms.models import BaseInlineFormSet
from django.db.models import Q
from django.utils import timezone
from bda.models import Attribution, Spectacle
@ -67,8 +68,9 @@ class AnnulForm(forms.Form):
self.fields['attributions'].queryset = participant.attribution_set\
.filter(spectacle__date__gte=timezone.now(),
revente__isnull=False,
revente__date__gte=timezone.now()-timedelta(hours=1),
revente__seller=participant)
revente__date__gte=timezone.now()-timedelta(hours=1))\
.filter(Q(revente__soldTo__isnull=True) |
Q(revente__soldTo=participant))
class InscriptionReventeForm(forms.Form):