mirror of
https://github.com/pretix/pretix.git
synced 2026-05-07 15:34:02 +00:00
Fix crash in OrderChangeManager log entry generation
This commit is contained in:
@@ -1944,14 +1944,14 @@ class OrderChangeManager:
|
|||||||
'position': op.position.pk,
|
'position': op.position.pk,
|
||||||
'positionid': op.position.positionid,
|
'positionid': op.position.positionid,
|
||||||
'addon_to': op.position.addon_to_id,
|
'addon_to': op.position.addon_to_id,
|
||||||
'old_taxrule': op.position.tax_rule.pk if op.position.tax_rate else None,
|
'old_taxrule': op.position.tax_rule.pk if op.position.tax_rule else None,
|
||||||
'new_taxrule': op.tax_rule.pk
|
'new_taxrule': op.tax_rule.pk
|
||||||
})
|
})
|
||||||
elif isinstance(op.position, OrderFee):
|
elif isinstance(op.position, OrderFee):
|
||||||
self.order.log_action('pretix.event.order.changed.tax_rule', user=self.user, auth=self.auth, data={
|
self.order.log_action('pretix.event.order.changed.tax_rule', user=self.user, auth=self.auth, data={
|
||||||
'fee': op.position.pk,
|
'fee': op.position.pk,
|
||||||
'fee_type': op.position.fee_type,
|
'fee_type': op.position.fee_type,
|
||||||
'old_taxrule': op.position.tax_rule.pk if op.position.tax_rate else None,
|
'old_taxrule': op.position.tax_rule.pk if op.position.tax_rule else None,
|
||||||
'new_taxrule': op.tax_rule.pk
|
'new_taxrule': op.tax_rule.pk
|
||||||
})
|
})
|
||||||
op.position._calculate_tax(op.tax_rule)
|
op.position._calculate_tax(op.tax_rule)
|
||||||
|
|||||||
Reference in New Issue
Block a user