Allow to re-check-in someone through the backend

This commit is contained in:
Raphael Michel
2020-08-24 17:27:06 +02:00
parent fc18788cb8
commit d1146add38

View File

@@ -141,7 +141,9 @@ class CheckInListShow(EventPermissionRequiredMixin, PaginationMixin, ListView):
for op in positions:
if op.order.status == Order.STATUS_PAID or (self.list.include_pending and op.order.status == Order.STATUS_PENDING):
t = Checkin.TYPE_EXIT if request.POST.get('checkout') == 'true' else Checkin.TYPE_ENTRY
if self.list.allow_multiple_entries or t != Checkin.TYPE_ENTRY:
lci = op.checkins.filter(list=self.list).first()
if self.list.allow_multiple_entries or t != Checkin.TYPE_ENTRY or (lci and lci.type != Checkin.TYPE_ENTRY):
ci = Checkin.objects.create(position=op, list=self.list, datetime=now(), type=t)
created = True
else: