mirror of
https://github.com/pretix/pretix.git
synced 2026-05-08 15:44:02 +00:00
Fix Exception when displaying mail_history (PRETIXEU-BB0) (#4934)
* Fix Exception when displaying mail_history Log entries of type pretix.plugins.banktransfer.order.email.invoice had type(invoices) == int instead of list * Update src/pretix/control/views/orders.py Co-authored-by: Richard Schreiber <schreiber@rami.io> --------- Co-authored-by: Raphael Michel <michel@rami.io> Co-authored-by: Richard Schreiber <schreiber@rami.io>
This commit is contained in:
@@ -2491,10 +2491,13 @@ class OrderEmailHistory(EventPermissionRequiredMixin, OrderViewMixin, ListView):
|
||||
def get_context_data(self, **kwargs):
|
||||
ctx = super().get_context_data(**kwargs)
|
||||
for l in ctx["logs"]:
|
||||
if l.parsed_data.get("invoices"):
|
||||
invoice_ids = l.parsed_data.get("invoices")
|
||||
if invoice_ids:
|
||||
if type(invoice_ids) is int:
|
||||
invoice_ids = [invoice_ids]
|
||||
l.parsed_invoices = Invoice.objects.filter(
|
||||
event=self.request.event,
|
||||
pk__in=l.parsed_data["invoices"],
|
||||
pk__in=invoice_ids,
|
||||
)
|
||||
if l.parsed_data.get("attach_other_files"):
|
||||
l.parsed_other_files = [
|
||||
|
||||
Reference in New Issue
Block a user