forked from CGM_Public/pretix_original
* Make products/orders that are not cancellable Update Unit Tests * Make use of select_related instead of prefetch_related Simplify cancellable logic Migrations * Simplify cancellable logic Maske use of select_related instead of prefetch_related * Fix cancelable condition bug
This commit is contained in:
committed by
Raphael Michel
parent
022e02d913
commit
841cfe52a2
@@ -243,7 +243,9 @@ class Order(LoggedModel):
|
||||
|
||||
@property
|
||||
def can_user_cancel(self) -> bool:
|
||||
return self.event.settings.cancel_allow_user
|
||||
positions = self.positions.all().select_related('item')
|
||||
cancelable = all([op.item.allow_cancel for op in positions])
|
||||
return self.event.settings.cancel_allow_user and cancelable
|
||||
|
||||
@property
|
||||
def is_expired_by_time(self):
|
||||
|
||||
Reference in New Issue
Block a user