mirror of
https://github.com/pretix/pretix.git
synced 2026-05-15 16:54:00 +00:00
Do not fail when enqueueing an order that's already in queue
This commit is contained in:
@@ -153,12 +153,15 @@ class OutboundSyncProvider:
|
|||||||
"""
|
"""
|
||||||
if not hasattr(cls, 'identifier'):
|
if not hasattr(cls, 'identifier'):
|
||||||
raise TypeError('Call this method on a derived class that defines an "identifier" attribute.')
|
raise TypeError('Call this method on a derived class that defines an "identifier" attribute.')
|
||||||
OrderSyncQueue.objects.create(
|
OrderSyncQueue.objects.update_or_create(
|
||||||
order=order,
|
order=order,
|
||||||
event=order.event,
|
|
||||||
sync_provider=cls.identifier,
|
sync_provider=cls.identifier,
|
||||||
triggered_by=triggered_by,
|
defaults={
|
||||||
not_before=not_before or now(),
|
"event": order.event,
|
||||||
|
"triggered_by": triggered_by,
|
||||||
|
"not_before": not_before or now(),
|
||||||
|
"need_manual_retry": None,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user