fix: save MeetingRegistration.checkedin as boolean value (#4446)
This commit is contained in:
parent
79bf320acc
commit
5b6695a04c
|
@ -180,7 +180,10 @@ def api_new_meeting_registration(request):
|
|||
try:
|
||||
# Update attributes
|
||||
for key in set(data.keys())-set(['attended', 'apikey', 'meeting', 'email']):
|
||||
new = data.get(key)
|
||||
if key == 'checkedin':
|
||||
new = bool(data.get(key).lower() == 'true')
|
||||
else:
|
||||
new = data.get(key)
|
||||
setattr(object, key, new)
|
||||
person = Person.objects.filter(email__address=email)
|
||||
if person.exists():
|
||||
|
|
|
@ -263,7 +263,7 @@ def get_meeting_registration_data(meeting):
|
|||
address = registration['Email'].strip()
|
||||
reg_type = registration['RegType'].strip()
|
||||
ticket_type = registration['TicketType'].strip()
|
||||
checkedin = registration['CheckedIn'].strip()
|
||||
checkedin = bool(registration['CheckedIn'].strip().lower() == 'true')
|
||||
|
||||
if (address, reg_type) in meeting_registrations:
|
||||
object = meeting_registrations.pop((address, reg_type))
|
||||
|
|
Loading…
Reference in a new issue