mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Use "cancel" method instead of "refund" for free orders (#743)
* Use "cancel" method instead of "refund" for free orders * Adjust API
This commit is contained in:
@@ -202,7 +202,7 @@
|
||||
{% endif %}
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
{% if order.status == "n" and order.can_user_cancel %}
|
||||
{% if order.can_user_cancel %}
|
||||
<div class="row">
|
||||
<div class="col-md-12 text-right">
|
||||
<p>
|
||||
|
||||
@@ -498,7 +498,7 @@ class OrderCancel(EventViewMixin, OrderDetailMixin, TemplateView):
|
||||
self.kwargs = kwargs
|
||||
if not self.order:
|
||||
raise Http404(_('Unknown order code or not authorized to access this order.'))
|
||||
if self.order.status != Order.STATUS_PENDING or not self.order.can_user_cancel:
|
||||
if not self.order.can_user_cancel:
|
||||
messages.error(request, _('You cannot cancel this order.'))
|
||||
return redirect(self.get_order_url())
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user