From a9f0d20779df0243c32aaf2a62d4c24fdb9a4d63 Mon Sep 17 00:00:00 2001 From: Nanoy Date: Fri, 17 May 2019 16:19:28 +0200 Subject: [PATCH] Fix la vue editKeg --- CHANGELOG.md | 2 ++ gestion/forms.py | 6 +++--- templates/footer.html | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e34d4b..e271cc3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +## v3.5.2 +* Fix la vue editKeg ## v3.5.1 * Les catégories apapraissent que si elles sont pas vides * Nombre de produits affiché sur la liste des catégories diff --git a/gestion/forms.py b/gestion/forms.py index 535a238..1d0a56f 100644 --- a/gestion/forms.py +++ b/gestion/forms.py @@ -46,9 +46,9 @@ class KegForm(forms.ModelForm): """ def __init__(self, *args, **kwargs): super(KegForm, self).__init__(*args, **kwargs) - self.fields['pinte'].queryset = Product.objects.filter(category=Product.P_PRESSION) - self.fields['demi'].queryset = Product.objects.filter(category=Product.D_PRESSION) - self.fields['galopin'].queryset = Product.objects.filter(category=Product.G_PRESSION) + self.fields['pinte'].queryset = Product.objects.filter(draft_category=Product.DRAFT_PINTE) + self.fields['demi'].queryset = Product.objects.filter(draft_category=Product.DRAFT_DEMI) + self.fields['galopin'].queryset = Product.objects.filter(draft_category=Product.DRAFT_GALOPIN) class Meta: model = Keg diff --git a/templates/footer.html b/templates/footer.html index ca62f35..29c3af8 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -42,6 +42,6 @@
  • Facebook
  • - +