mirror of
https://github.com/pretix/pretix.git
synced 2026-08-16 11:46:27 +00:00
Use answers.update() instead of looping over answers
This commit is contained in:
@@ -1120,10 +1120,7 @@ def _create_order(event: Event, *, email: str, positions: List[CartPosition], no
|
||||
except CheckoutSession.DoesNotExist:
|
||||
pass
|
||||
else:
|
||||
for answ in session.answers.all():
|
||||
answ.order = order
|
||||
answ.checkoutsession = None
|
||||
answ.save()
|
||||
session.answers.update(order=order, checkoutsession=None)
|
||||
session.delete()
|
||||
|
||||
order_placed.send(event, order=order, bulk=False)
|
||||
|
||||
Reference in New Issue
Block a user