Skip to content

Commit

Permalink
Make create tickets idempodent again.
Browse files Browse the repository at this point in the history
  • Loading branch information
valberg committed Jul 29, 2023
1 parent cc94abc commit d668a3e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -826,7 +826,7 @@ def create_tickets(self, request: Optional[HttpRequest] = None):
for _i in range(self.quantity):
# Iterate over all ticket types that are related to this product

ticket_group = TicketGroup.objects.create(opr=self)
ticket_group, _ = TicketGroup.objects.get_or_create(opr=self)

for sub_product_relation in sub_product_relations:
new_tickets = self._create_tickets_helper(
Expand Down

0 comments on commit d668a3e

Please sign in to comment.