use category name instead of uuid in settings
This commit is contained in:
parent
77f79ec64c
commit
eb13b2d6e2
|
@ -165,8 +165,7 @@ class Order(CreatedUpdatedModel):
|
||||||
self.paid = True
|
self.paid = True
|
||||||
self.open = None
|
self.open = None
|
||||||
for order_product in self.orderproductrelation_set.all():
|
for order_product in self.orderproductrelation_set.all():
|
||||||
category_pk = str(order_product.product.category.pk)
|
if order_product.product.category.name == "Tickets":
|
||||||
if category_pk == settings.TICKET_CATEGORY_ID:
|
|
||||||
for _ in range(0, order_product.quantity):
|
for _ in range(0, order_product.quantity):
|
||||||
ticket = Ticket(
|
ticket = Ticket(
|
||||||
order=self,
|
order=self,
|
||||||
|
|
Loading…
Reference in a new issue