Skip to content

Commit b04686d

Browse files
authored
Merge pull request #8621 from progmatic-99/free-reg
fix: make free registration order complete
2 parents 0266aad + bc2d3d5 commit b04686d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/api/helpers/order.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,15 +283,15 @@ def calculate_order_amount(tickets, discount_code=None):
283283
f"{ticket.min_price} to {ticket.max_price}",
284284
)
285285
else:
286-
price = ticket.price if ticket.type != 'free' else 0.0
286+
price = ticket.price if ticket.type not in ['free', 'freeRegistration'] else 0.0
287287

288288
if tax:
289289
if tax_included:
290290
ticket_tax = price - price / (1 + tax.rate / 100)
291291
else:
292292
ticket_tax = price * tax.rate / 100
293293

294-
if discount_code and ticket.type != 'free':
294+
if discount_code and ticket.type not in ['free', 'freeRegistration']:
295295
code = (
296296
DiscountCode.query.with_parent(ticket)
297297
.filter_by(id=discount_code.id)

0 commit comments

Comments
 (0)