forked from CGM_Public/pretix_original
Fix checking in something that is checked in multiple times
This commit is contained in:
@@ -116,10 +116,13 @@ def perform_checkin(op: OrderPosition, clist: CheckinList, given_answers: dict,
|
|||||||
require_answers
|
require_answers
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
ci, created = Checkin.objects.get_or_create(position=op, list=clist, defaults={
|
try:
|
||||||
'datetime': dt,
|
ci, created = Checkin.objects.get_or_create(position=op, list=clist, defaults={
|
||||||
'nonce': nonce,
|
'datetime': dt,
|
||||||
})
|
'nonce': nonce,
|
||||||
|
})
|
||||||
|
except Checkin.MultipleObjectsReturned:
|
||||||
|
ci, created = Checkin.objects.filter(position=op, list=clist).last(), False
|
||||||
|
|
||||||
if created or (nonce and nonce == ci.nonce):
|
if created or (nonce and nonce == ci.nonce):
|
||||||
if created:
|
if created:
|
||||||
|
|||||||
Reference in New Issue
Block a user