Send checkin list mapping in event_copy_data signal (#1624)

* Send checkin list map in event_copy_data signal

* Add checkin_list_map to documentation and definition of event_copy_data
This commit is contained in:
pajowu
2020-03-25 13:03:45 +01:00
committed by GitHub
parent 3eafec9d6e
commit 30dcda616b
2 changed files with 7 additions and 5 deletions

View File

@@ -622,8 +622,10 @@ class Event(EventMixin, LoggedModel):
q.dependency_question = question_map[q.dependency_question_id]
q.save(update_fields=['dependency_question'])
checkin_list_map = {}
for cl in other.checkin_lists.filter(subevent__isnull=True).prefetch_related('limit_products'):
items = list(cl.limit_products.all())
checkin_list_map[cl.pk] = cl
cl.pk = None
cl.event = self
cl.save()
@@ -678,7 +680,7 @@ class Event(EventMixin, LoggedModel):
event_copy_data.send(
sender=self, other=other,
tax_map=tax_map, category_map=category_map, item_map=item_map, variation_map=variation_map,
question_map=question_map
question_map=question_map, checkin_list_map=checkin_list_map
)
def get_payment_providers(self, cached=False) -> dict: