Fix KeyError for form validation

This commit is contained in:
Raphael Michel
2020-02-13 09:21:23 +01:00
parent a1da2eafdc
commit 34ec11ecfa

View File

@@ -723,7 +723,7 @@ class ItemBundleForm(I18nModelForm):
def clean(self):
d = super().clean()
if not self.cleaned_data['designated_price']:
if not self.cleaned_data.get('designated_price'):
d['designated_price'] = Decimal('0.00')
self.instance.designated_price = Decimal('0.00')