Fix migrating until

parent 0dc174b4
......@@ -72,7 +72,8 @@ class Command(legacylogin.Command):
course.ec = int(src['e_c_t_s'])
course.period = src['quarter'].replace(' en ', ' & ')
course.since = src['since']
course.until = src['until'] if src['until'] != 0 else None
if int(src['until']) != 0:
course.until = src['until']
course.save()
for id in src['categories']:
......
......@@ -101,6 +101,8 @@ class Command(BaseCommand):
print('[!]Could neither find {} nor {}'.format(
django_field, django_multilingualfield))
return
if django_field == 'title':
django_field = django_field[:100]
setattr(new_event, django_multilingualfield,
concrete_data)
......@@ -133,8 +135,8 @@ class Command(BaseCommand):
events_models.RegistrationInformationField(
# TODO: UGLY AF
name_en=field_data['field_name'],
name_nl=field_data['field_name'],
name_en=field_data['field_name'][:100],
name_nl=field_data['field_name'][:100],
description_en=field_data['field_explanation'],
description_nl=field_data['field_explanation'],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment