mirror of
https://github.com/pretix/pretix.git
synced 2026-05-04 15:04:03 +00:00
Refactor cancelling positions and orders in the data model (#1088)
- [x] Data model - [x] display in order view in backend - [x] review all usages of OrderPositions.objects - [x] review all usages of order.positions - [x] review all other model usages - [x] review plugins - [x] plugins backwards-compatible API? - [x] decide on way forward for REST API - [x] need to cancel fees - [x] tests - [ ] plugins - [ ] gdpr - [ ] reports - [x] docs
This commit is contained in:
@@ -65,9 +65,11 @@ class SenderView(EventPermissionRequiredMixin, FormView):
|
||||
statusq |= Q(status=Order.STATUS_PENDING, expires__lt=now())
|
||||
orders = qs.filter(statusq)
|
||||
if form.cleaned_data.get('item'):
|
||||
orders = orders.filter(positions__item=form.cleaned_data.get('item'))
|
||||
orders = orders.filter(all_positions__item=form.cleaned_data.get('item'),
|
||||
all_positions__canceled=False)
|
||||
if form.cleaned_data.get('subevent'):
|
||||
orders = orders.filter(positions__subevent__in=(form.cleaned_data.get('subevent'),))
|
||||
orders = orders.filter(all_positions__subevent__in=(form.cleaned_data.get('subevent'),),
|
||||
all_positions__canceled=False)
|
||||
orders = orders.distinct()
|
||||
|
||||
self.output = {}
|
||||
|
||||
Reference in New Issue
Block a user