forked from CGM_Public/pretix_original
Sendmail plugins: Fix issues around history of checkin-filtered emails
This commit is contained in:
@@ -112,7 +112,6 @@ class MailForm(forms.Form):
|
|||||||
'organizer': event.organizer.slug,
|
'organizer': event.organizer.slug,
|
||||||
}),
|
}),
|
||||||
'data-placeholder': _('Send to customers checked in on list'),
|
'data-placeholder': _('Send to customers checked in on list'),
|
||||||
'data-inverse-dependency': '#id_not_checked_in'
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
self.fields['checkin_lists'].widget.choices = self.fields['checkin_lists'].choices
|
self.fields['checkin_lists'].widget.choices = self.fields['checkin_lists'].choices
|
||||||
|
|||||||
@@ -54,8 +54,11 @@ class SenderView(EventPermissionRequiredMixin, FormView):
|
|||||||
id=logentry.parsed_data['item']['id']
|
id=logentry.parsed_data['item']['id']
|
||||||
)
|
)
|
||||||
if 'checkin_lists' in logentry.parsed_data:
|
if 'checkin_lists' in logentry.parsed_data:
|
||||||
kwargs['initial']['checkin_lists'] = logentry.parsed_data['checkin_lists']
|
kwargs['initial']['checkin_lists'] = self.request.event.checkin_lists.filter(
|
||||||
|
id__in=[c['id'] for c in logentry.parsed_data['checkin_lists']]
|
||||||
|
)
|
||||||
kwargs['initial']['filter_checkins'] = logentry.parsed_data.get('filter_checkins', False)
|
kwargs['initial']['filter_checkins'] = logentry.parsed_data.get('filter_checkins', False)
|
||||||
|
kwargs['initial']['not_checked_in'] = logentry.parsed_data.get('not_checked_in', False)
|
||||||
if logentry.parsed_data.get('subevent'):
|
if logentry.parsed_data.get('subevent'):
|
||||||
try:
|
try:
|
||||||
kwargs['initial']['subevent'] = self.request.event.subevents.get(
|
kwargs['initial']['subevent'] = self.request.event.subevents.get(
|
||||||
@@ -204,7 +207,7 @@ class EmailHistoryView(EventPermissionRequiredMixin, ListView):
|
|||||||
itemcache[i['id']] for i in log.pdata.get('items', [])
|
itemcache[i['id']] for i in log.pdata.get('items', [])
|
||||||
]
|
]
|
||||||
log.pdata['checkin_lists'] = [
|
log.pdata['checkin_lists'] = [
|
||||||
checkin_list_cache[i] for i in log.pdata.get('checkin_lists', []) if i in checkin_list_cache
|
checkin_list_cache[i['id']] for i in log.pdata.get('checkin_lists', []) if i['id'] in checkin_list_cache
|
||||||
]
|
]
|
||||||
if log.pdata.get('subevent'):
|
if log.pdata.get('subevent'):
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user