Commit c42a4867 authored by fred's avatar fred

don't abort on soundfiles removed even if there are stats about them

parent 6e48764c
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('stats', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='dailystat',
name='soundfile',
field=models.ForeignKey(on_delete=django.db.models.deletion.SET_NULL, to='emissions.SoundFile', null=True),
preserve_default=True,
),
]
......@@ -4,7 +4,7 @@ from emissions.models import SoundFile
class DailyStat(models.Model):
soundfile = models.ForeignKey(SoundFile)
soundfile = models.ForeignKey(SoundFile, on_delete=models.SET_NULL, null=True)
day = models.DateField()
nb_events = models.IntegerField()
nb_visits = models.IntegerField()
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