mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Race conditions can lead to duplicate CachedTickets
This commit is contained in:
@@ -509,9 +509,9 @@ class OrderDownload(EventViewMixin, OrderDetailMixin, View):
|
||||
return redirect(self.get_order_url())
|
||||
|
||||
try:
|
||||
ct = CachedTicket.objects.get(
|
||||
ct = CachedTicket.objects.filter(
|
||||
order_position=self.order_position, provider=self.output.identifier
|
||||
)
|
||||
).last()
|
||||
except CachedTicket.DoesNotExist:
|
||||
ct = None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user