Minor services optimizations

This commit is contained in:
Raphael Michel
2015-12-06 18:32:29 +01:00
parent 324c35cbeb
commit 613c072ee6
2 changed files with 19 additions and 17 deletions

View File

@@ -182,21 +182,22 @@ def _perform_order(event: str, payment_provider: str, position_ids: List[str],
_check_positions(event, dt, positions)
order = _create_order(event, email, positions, dt, pprov,
locale=locale)
mail(
order.email, _('Your order: %(code)s') % {'code': order.code},
'pretixpresale/email/order_placed.txt',
{
'order': order,
'event': event,
'url': build_absolute_uri(event, 'presale:event.order', kwargs={
'order': order.code,
'secret': order.secret
}),
'payment': pprov.order_pending_mail_render(order)
},
event, locale=order.locale
)
return order.identity
mail(
order.email, _('Your order: %(code)s') % {'code': order.code},
'pretixpresale/email/order_placed.txt',
{
'order': order,
'event': event,
'url': build_absolute_uri(event, 'presale:event.order', kwargs={
'order': order.code,
'secret': order.secret
}),
'payment': pprov.order_pending_mail_render(order)
},
event, locale=order.locale
)
return order.identity
def perform_order(event: str, payment_provider: str, positions: List[str],