mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
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')
|
||||
|
||||
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:
|
||||
self._calculate_tax()
|
||||
self.order.touch()
|
||||
|
||||
Reference in New Issue
Block a user