mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Use @transaction.atomic instead of @transaction.atomic()
This commit is contained in:
@@ -80,7 +80,7 @@ def lock_event_db(event):
|
||||
raise EventLock.LockTimeoutException()
|
||||
|
||||
|
||||
@transaction.atomic()
|
||||
@transaction.atomic
|
||||
def release_event_db(event):
|
||||
if not hasattr(event, '_lock') or not event._lock:
|
||||
raise EventLock.LockReleaseException('Lock is not owned by this thread')
|
||||
|
||||
@@ -258,7 +258,7 @@ def _check_positions(event: Event, now_dt: datetime, positions: List[CartPositio
|
||||
raise OrderError(err)
|
||||
|
||||
|
||||
@transaction.atomic()
|
||||
@transaction.atomic
|
||||
def _create_order(event: Event, email: str, positions: List[CartPosition], now_dt: datetime,
|
||||
payment_provider: BasePaymentProvider, locale: str=None):
|
||||
total = sum([c.price for c in positions])
|
||||
|
||||
Reference in New Issue
Block a user