Skip to content

Commit 46d0f79

Browse files
committed
Include conference enddate directly in status message as well
This is useful to sort the conferences
1 parent 60878cb commit 46d0f79

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

postgresqleu/confreg/checkin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,7 @@ def _checkin_api(request, urlname, regtoken, what, tokenfield, tokenmatcher, fie
312312
'active': conference.checkinactive,
313313
'activestatus': 'Check-in active' if conference.checkinactive else 'Check-in is not open',
314314
'confname': conference.conferencename,
315+
'enddate': conference.enddate,
315316
'admin': is_admin,
316317
'permissions': get_conference_scanner_permissions(user.attendee),
317318
**extrastatus

postgresqleu/confsponsor/scanning.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from django.shortcuts import render, get_object_or_404
2+
from django.core.serializers.json import DjangoJSONEncoder
23
from django.http import HttpResponse, HttpResponseRedirect, Http404
34
from django.views.decorators.csrf import csrf_exempt
45
from django.contrib.auth.decorators import login_required
@@ -302,11 +303,12 @@ def scanning_api(request, scannertoken, what):
302303
'name': '{} for {}'.format(scanner.scanner.fullname, scanner.sponsor.displayname),
303304
'sponsorname': scanner.sponsor.displayname,
304305
'confname': scanner.sponsor.conference.conferencename,
306+
'enddate': scanner.sponsor.conference.enddate,
305307
'active': True, # As soon as badges are available they can be scanned.
306308
'admin': False, # There are no "admins" in badge scanning
307309
'activestatus': '',
308310
'permissions': get_conference_scanner_permissions(scanner.scanner.attendee),
309-
}), content_type='application/json')
311+
}, cls=DjangoJSONEncoder), content_type='application/json')
310312
elif what == 'lookup':
311313
token = request.GET.get('lookup')
312314
m = _tokenmatcher.match(token)

0 commit comments

Comments
 (0)