forked from CGM_Public/pretix_original
Add logdisplay
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
import django_filters
|
import django_filters
|
||||||
from django.core.exceptions import ValidationError
|
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.db.models.functions import Coalesce
|
||||||
from django.http import Http404
|
from django.http import Http404
|
||||||
from django.shortcuts import get_object_or_404
|
from django.shortcuts import get_object_or_404
|
||||||
|
|||||||
@@ -165,21 +165,42 @@ def _display_checkin(event, logentry):
|
|||||||
if logentry.action_type == 'pretix.event.checkin.unknown':
|
if logentry.action_type == 'pretix.event.checkin.unknown':
|
||||||
if show_dt:
|
if show_dt:
|
||||||
return _(
|
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(
|
).format(
|
||||||
posid=data.get('positionid'),
|
posid=data.get('positionid'),
|
||||||
type=data.get('type'),
|
type=data.get('type'),
|
||||||
barcode=data.get('barcode'),
|
barcode=data.get('barcode')[:16],
|
||||||
datetime=dt_formatted,
|
datetime=dt_formatted,
|
||||||
list=checkin_list
|
list=checkin_list
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return _(
|
return _(
|
||||||
'Unknown scan of code "{barcode}" for list "{list}", type "{type}".'
|
'Unknown scan of code "{barcode}…" for list "{list}", type "{type}".'
|
||||||
).format(
|
).format(
|
||||||
posid=data.get('positionid'),
|
posid=data.get('positionid'),
|
||||||
type=data.get('type'),
|
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
|
list=checkin_list
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user