From b0c4c626686178320e874ac5686b7e5637cbaf74 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Wed, 22 Nov 2017 11:59:03 +0100 Subject: [PATCH] Expose product mapping in event_copy_data signal --- src/pretix/base/models/event.py | 5 ++++- src/pretix/base/signals.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/pretix/base/models/event.py b/src/pretix/base/models/event.py index 54bc7179f..1a0c53fb2 100644 --- a/src/pretix/base/models/event.py +++ b/src/pretix/base/models/event.py @@ -431,7 +431,10 @@ class Event(EventMixin, LoggedModel): else: s.save() - event_copy_data.send(sender=self, other=other) + event_copy_data.send( + sender=self, other=other, + tax_map=tax_map, category_map=category_map, item_map=item_map, variation_map=variation_map, + ) def get_payment_providers(self) -> dict: """ diff --git a/src/pretix/base/signals.py b/src/pretix/base/signals.py index da654ea3d..48e12b7df 100644 --- a/src/pretix/base/signals.py +++ b/src/pretix/base/signals.py @@ -223,7 +223,10 @@ You don't need to copy data inside the general settings storage which is cloned but you might need to modify that data. The ``sender`` keyword argument will contain the event of the **new** event. The ``other`` -keyword argument will contain the event to **copy from**. +keyword argument will contain the event to **copy from**. The keyword arguments +``tax_map``, ``category_map``, ``item_map``, and ``variation_map`` contain mappings +from object IDs in the original event to objects in the new event of the respective +types. """ periodic_task = django.dispatch.Signal()