Commit f3870be6 authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg

Merge branch 'fix/migrate_events_cancel' into 'master'

Fix canceldate not being migrated correctly

Closes #178

See merge request !186
parents fc682450 f2794ce5
......@@ -176,7 +176,7 @@ class Command(BaseCommand):
cancelled_date = registration_data['canceled']
if cancelled_date:
new_registration.cancelled_date = naive_to_aware(
new_registration.date_cancelled = naive_to_aware(
cancelled_date)
new_registration.save()
......
# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-30 19:30
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('events', '0009_auto_20161024_0029'),
]
operations = [
migrations.AlterField(
model_name='registration',
name='date',
field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='registration date'),
),
]
......@@ -291,7 +291,8 @@ class Registration(models.Model):
blank=True
)
date = models.DateTimeField(_('registration date'), auto_now_add=True)
date = models.DateTimeField(_('registration date'),
default=timezone.now)
date_cancelled = models.DateTimeField(_('cancellation date'),
null=True,
blank=True)
......
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