mirror of
https://github.com/pretix/pretix.git
synced 2026-08-14 11:26:26 +00:00
Remove wrong optimization
This commit is contained in:
@@ -424,7 +424,6 @@ def _cancel_order(order, user=None, send_mail: bool=True, api_token=None, device
|
|||||||
m.canceled = True
|
m.canceled = True
|
||||||
m.save()
|
m.save()
|
||||||
|
|
||||||
transaction_args = {}
|
|
||||||
if cancellation_fee:
|
if cancellation_fee:
|
||||||
with order.event.lock():
|
with order.event.lock():
|
||||||
for position in order.positions.all():
|
for position in order.positions.all():
|
||||||
@@ -459,7 +458,6 @@ def _cancel_order(order, user=None, send_mail: bool=True, api_token=None, device
|
|||||||
order.total = cancellation_fee
|
order.total = cancellation_fee
|
||||||
order.cancellation_date = now()
|
order.cancellation_date = now()
|
||||||
order.save(update_fields=['status', 'cancellation_date', 'total'])
|
order.save(update_fields=['status', 'cancellation_date', 'total'])
|
||||||
transaction_args['positions'] = []
|
|
||||||
|
|
||||||
if cancel_invoice and i:
|
if cancel_invoice and i:
|
||||||
invoices.append(generate_invoice(order))
|
invoices.append(generate_invoice(order))
|
||||||
@@ -480,7 +478,7 @@ def _cancel_order(order, user=None, send_mail: bool=True, api_token=None, device
|
|||||||
data={'cancellation_fee': cancellation_fee})
|
data={'cancellation_fee': cancellation_fee})
|
||||||
order.cancellation_requests.all().delete()
|
order.cancellation_requests.all().delete()
|
||||||
|
|
||||||
order.create_transactions(**transaction_args)
|
order.create_transactions()
|
||||||
|
|
||||||
if send_mail:
|
if send_mail:
|
||||||
email_template = order.event.settings.mail_text_order_canceled
|
email_template = order.event.settings.mail_text_order_canceled
|
||||||
|
|||||||
Reference in New Issue
Block a user