diff --git a/src/pretix/base/services/notifications.py b/src/pretix/base/services/notifications.py index 090f4f339..9c5460b75 100644 --- a/src/pretix/base/services/notifications.py +++ b/src/pretix/base/services/notifications.py @@ -104,7 +104,11 @@ def send_notification_mail(notification: Notification, user: User): mail_send_task.apply_async(kwargs={ 'to': [user.email], - 'subject': '[{}] {}'.format(settings.PRETIX_INSTANCE_NAME, notification.title), + 'subject': '[{}] {}: {}'.format( + settings.PRETIX_INSTANCE_NAME, + notification.event.settings.mail_prefix or notification.event.slug.upper(), + notification.title + ), 'body': body_plain, 'html': body_html, 'sender': settings.MAIL_FROM, diff --git a/src/pretix/base/services/tickets.py b/src/pretix/base/services/tickets.py index e661e9963..c41881675 100644 --- a/src/pretix/base/services/tickets.py +++ b/src/pretix/base/services/tickets.py @@ -145,7 +145,7 @@ def get_tickets_for_order(order): retval = generate_orderposition(pos.pk, p.identifier) if not retval: continue - ct = CachedCombinedTicket.objects.get(pk=retval) + ct = CachedTicket.objects.get(pk=retval) tickets.append(( "{}-{}-{}-{}{}".format( order.event.slug.upper(), order.code, pos.positionid, ct.provider, ct.extension, diff --git a/src/tests/base/test_notifications.py b/src/tests/base/test_notifications.py index d1c713aaa..96fffd764 100644 --- a/src/tests/base/test_notifications.py +++ b/src/tests/base/test_notifications.py @@ -65,6 +65,7 @@ def test_notification_trigger_event_specific(event, order, user, monkeypatch_on_ with transaction.atomic(): order.log_action('pretix.event.order.paid', {}) assert len(djmail.outbox) == 1 + assert djmail.outbox[0].subject.endswith("DUMMY: Order FOO has been marked as paid.") @pytest.mark.django_db