Fix error in AddStockForm

This commit is contained in:
Mario Hüttel 2021-11-08 23:16:02 +01:00
parent fbb60b455f
commit 95b0ff4933

View File

@ -99,7 +99,7 @@ class AddStockForm(forms.Form):
amount = self.cleaned_data.get('amount') amount = self.cleaned_data.get('amount')
watermark = -1 watermark = -1
if self.cleaned_data.get('watermark-active'): if self.cleaned_data.get('watermark_active'):
watermark = self.cleaned_data.get('watermark') watermark = self.cleaned_data.get('watermark')
new_stock = parts_models.Stock.objects.create(storage=storage, component=component, watermark=watermark, amount=amount) new_stock = parts_models.Stock.objects.create(storage=storage, component=component, watermark=watermark, amount=amount)