forked from CGM_Public/pretix_original
Prevent issues with order fees and TaxRule.zero()
This commit is contained in:
@@ -1869,6 +1869,9 @@ class OrderFee(models.Model):
|
|||||||
self.tax_rate = Decimal('0.00')
|
self.tax_rate = Decimal('0.00')
|
||||||
|
|
||||||
def save(self, *args, **kwargs):
|
def save(self, *args, **kwargs):
|
||||||
|
if self.tax_rule and not self.tax_rule.rate and not self.tax_rule.pk:
|
||||||
|
self.tax_rule = None
|
||||||
|
|
||||||
if self.tax_rate is None:
|
if self.tax_rate is None:
|
||||||
self._calculate_tax()
|
self._calculate_tax()
|
||||||
self.order.touch()
|
self.order.touch()
|
||||||
|
|||||||
Reference in New Issue
Block a user