From 17dd91d56bf4240f6b7fa0a8bbf8bb1395edf4fa Mon Sep 17 00:00:00 2001 From: Christopher Neugebauer Date: Mon, 5 Sep 2016 14:45:51 +1000 Subject: [PATCH] Fixes bug in the t-shirt-style widget. --- registrasion/forms.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/registrasion/forms.py b/registrasion/forms.py index df75cc9f..cc555b78 100644 --- a/registrasion/forms.py +++ b/registrasion/forms.py @@ -340,6 +340,14 @@ class _ItemQuantityProductsFormSet(_HasProductsFields, forms.BaseFormSet): for form in self.forms: form.add_product_error(product, error) + @property + def errors(self): + _errors = super(_ItemQuantityProductsFormSet, self).errors + if False not in [not form.errors for form in self.forms]: + return [] + else: + return _errors + class VoucherForm(forms.Form): voucher = forms.CharField(