diff --git a/django_kepi/migrations/0007_auto_20190814_2220.py b/django_kepi/migrations/0007_auto_20190814_2220.py new file mode 100644 index 0000000..419dfdd --- /dev/null +++ b/django_kepi/migrations/0007_auto_20190814_2220.py @@ -0,0 +1,19 @@ +# Generated by Django 2.2.1 on 2019-08-14 22:20 + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('django_kepi', '0006_auto_20190814_2151'), + ] + + operations = [ + migrations.AlterField( + model_name='mention', + name='from_status', + field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='django_kepi.Object'), + ), + ] diff --git a/django_kepi/models/mention.py b/django_kepi/models/mention.py index db94bec..c700b85 100644 --- a/django_kepi/models/mention.py +++ b/django_kepi/models/mention.py @@ -8,7 +8,7 @@ logger = logging.getLogger(name='django_kepi') class Mention(models.Model): from_status = models.ForeignKey( - 'django_kepi.Item', + 'django_kepi.Object', on_delete = models.DO_NOTHING, ) @@ -27,8 +27,6 @@ class Mention(models.Model): status, tags): - from django_kepi.models.actor import Actor - cls.objects.filter( from_status = status, ).delete()