Skip to content

Commit

Permalink
Correct position numbering
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelm committed Dec 23, 2016
1 parent dddb1d4 commit 16ab6e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pretix/base/models/orders.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,12 @@ def transform_cart_positions(cls, cp: List, order) -> list:
from . import Voucher

ops = []
for cartpos in cp:
for i, cartpos in enumerate(cp):
op = OrderPosition(order=order)
for f in AbstractPosition._meta.fields:
setattr(op, f.name, getattr(cartpos, f.name))
op._calculate_tax()
op.positionid = i + 1
op.save()
for answ in cartpos.answers.all():
answ.orderposition = op
Expand Down

0 comments on commit 16ab6e4

Please sign in to comment.