Просмотр исходного кода

Fix validation issue with basket formset

The new price_currency field was not explicitly being excluded.
master
David Winterbottom 12 лет назад
Родитель
Сommit
2fcf5cf49a
1 измененных файлов: 2 добавлений и 1 удалений
  1. 2
    1
      oscar/apps/basket/forms.py

+ 2
- 1
oscar/apps/basket/forms.py Просмотреть файл

@@ -26,6 +26,7 @@ class BasketLineForm(forms.ModelForm):
26 26
         return qty
27 27
 
28 28
     def check_max_allowed_quantity(self, qty):
29
+        self.instance.basket.strategy = self.strategy
29 30
         is_allowed, reason = self.instance.basket.is_quantity_allowed(qty)
30 31
         if not is_allowed:
31 32
             raise forms.ValidationError(reason)
@@ -40,7 +41,7 @@ class BasketLineForm(forms.ModelForm):
40 41
     class Meta:
41 42
         model = Line
42 43
         exclude = ('basket', 'product', 'stockrecord', 'line_reference',
43
-                   'price_excl_tax', 'price_incl_tax')
44
+                   'price_excl_tax', 'price_incl_tax', 'price_currency')
44 45
 
45 46
 
46 47
 class BaseBasketLineFormSet(BaseModelFormSet):

Загрузка…
Отмена
Сохранить