diff --git a/src/pretix/api/views/checkin.py b/src/pretix/api/views/checkin.py index 99756e0936..0385477a8d 100644 --- a/src/pretix/api/views/checkin.py +++ b/src/pretix/api/views/checkin.py @@ -1,6 +1,8 @@ import django_filters from django.core.exceptions import ValidationError -from django.db.models import Count, F, Max, OuterRef, Prefetch, Q, Subquery, Exists +from django.db.models import ( + Count, Exists, F, Max, OuterRef, Prefetch, Q, Subquery, +) from django.db.models.functions import Coalesce from django.http import Http404 from django.shortcuts import get_object_or_404 diff --git a/src/pretix/control/logdisplay.py b/src/pretix/control/logdisplay.py index 537c93bc44..0767a93844 100644 --- a/src/pretix/control/logdisplay.py +++ b/src/pretix/control/logdisplay.py @@ -165,21 +165,42 @@ def _display_checkin(event, logentry): if logentry.action_type == 'pretix.event.checkin.unknown': if show_dt: return _( - 'Unknown scan of code "{barcode}" at {datetime} for list "{list}", type "{type}".' + 'Unknown scan of code "{barcode}…" at {datetime} for list "{list}", type "{type}".' ).format( posid=data.get('positionid'), type=data.get('type'), - barcode=data.get('barcode'), + barcode=data.get('barcode')[:16], datetime=dt_formatted, list=checkin_list ) else: return _( - 'Unknown scan of code "{barcode}" for list "{list}", type "{type}".' + 'Unknown scan of code "{barcode}…" for list "{list}", type "{type}".' ).format( posid=data.get('positionid'), type=data.get('type'), - barcode=data.get('barcode'), + barcode=data.get('barcode')[:16], + list=checkin_list + ) + + if logentry.action_type == 'pretix.event.checkin.revoked': + if show_dt: + return _( + 'Scan scan of revoked code "{barcode}…" at {datetime} for list "{list}", type "{type}", was uploaded.' + ).format( + posid=data.get('positionid'), + type=data.get('type'), + barcode=data.get('barcode')[:16], + datetime=dt_formatted, + list=checkin_list + ) + else: + return _( + 'Scan of revoked code "{barcode}" for list "{list}", type "{type}", was uploaded.' + ).format( + posid=data.get('positionid'), + type=data.get('type'), + barcode=data.get('barcode')[:16], list=checkin_list )