]> git.0d.be Git - django-panik-nonstop.git/commitdiff
models: allow recording log lines without file id
authorFrédéric Péters <fpeters@0d.be>
Thu, 2 Jul 2020 08:01:09 +0000 (10:01 +0200)
committerFrédéric Péters <fpeters@0d.be>
Thu, 2 Jul 2020 08:01:09 +0000 (10:01 +0200)
nonstop/migrations/0027_auto_20200702_1001.py [new file with mode: 0644]
nonstop/models.py

diff --git a/nonstop/migrations/0027_auto_20200702_1001.py b/nonstop/migrations/0027_auto_20200702_1001.py
new file mode 100644 (file)
index 0000000..46253c9
--- /dev/null
@@ -0,0 +1,21 @@
+# -*- coding: utf-8 -*-
+# Generated by Django 1.11.29 on 2020-07-02 10:01
+from __future__ import unicode_literals
+
+from django.db import migrations, models
+import django.db.models.deletion
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ('nonstop', '0026_somalogline_track'),
+    ]
+
+    operations = [
+        migrations.AlterField(
+            model_name='somalogline',
+            name='filepath',
+            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='nonstop.NonstopFile'),
+        ),
+    ]
index 8ae372c6571b2e78a5d44a84554b126cddbb9e46..07d4ad339cef6f7b59e36979183a6222c8697483 100644 (file)
@@ -157,7 +157,7 @@ class SomaLogLine(models.Model):
         verbose_name_plural = _('Soma log lines')
         ordering = ['play_timestamp']
 
-    filepath = models.ForeignKey(NonstopFile)
+    filepath = models.ForeignKey(NonstopFile, null=True)
     track = models.ForeignKey(Track, null=True)
     play_timestamp = models.DateTimeField()
     on_air = models.NullBooleanField('On Air')