From 22fbf01dd582dc0300719b17e13074869fc8bc00 Mon Sep 17 00:00:00 2001 From: Tom Teichler <tom.teichler@teckids.org> Date: Tue, 10 Mar 2020 08:58:01 +0100 Subject: [PATCH] Fix migration --- .../chronos/migrations/0007_advanced_models_from_untis.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/aleksis/apps/chronos/migrations/0007_advanced_models_from_untis.py b/aleksis/apps/chronos/migrations/0007_advanced_models_from_untis.py index c57302bd..88c3a23d 100644 --- a/aleksis/apps/chronos/migrations/0007_advanced_models_from_untis.py +++ b/aleksis/apps/chronos/migrations/0007_advanced_models_from_untis.py @@ -123,10 +123,14 @@ class Migration(migrations.Migration): name='absence_reason', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='absence_reason', to='chronos.AbsenceReason', verbose_name='Absence reason'), ), + migrations.AddField( + model_name='event', + name='teacher', + field=models.ManyToManyField(related_name='events', to='core.Person', verbose_name='Teachers') migrations.AddField( model_name='event', name='group', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='group', to='core.Group', verbose_name='Group'), + field=models.ManyToManyField(related_name='group', to='core.Group', verbose_name='Groups'), ), migrations.AddField( model_name='event', @@ -141,7 +145,7 @@ class Migration(migrations.Migration): migrations.AddField( model_name='event', name='subject', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='subject', to='chronos.Subject', verbose_name='Subject'), + field=models.ManyToManyField(related_name='events', to='chronos.Subject', verbose_name='Subjects'), ), migrations.AddField( model_name='absence', -- GitLab