kfet -- Add fixme related to available checkouts in K-Psul

This commit is contained in:
Aurélien Delobelle 2018-10-01 16:45:48 +02:00
parent ec29e6ef5c
commit 93d3c124fd

View file

@ -273,6 +273,10 @@ class ArticleRestrictForm(ArticleForm):
# -----
class KPsulOperationGroupForm(forms.ModelForm):
# FIXME(AD): Use timezone.now instead of timezone.now() to avoid using a
# fixed datetime (application boot here).
# One may even use: Checkout.objects.is_valid() if changing
# to now = timezone.now is ok in 'is_valid' definition.
checkout = forms.ModelChoiceField(
queryset = Checkout.objects.filter(
is_protected=False, valid_from__lte=timezone.now(),