Skip to content

Commit

Permalink
Added django 2.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-qayyum-khan committed Jul 16, 2018
1 parent 56eb85b commit bc578f0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dj_elastictranscoder/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from __future__ import unicode_literals

from django.db import models, migrations
import django.db.models.deletion


class Migration(migrations.Migration):
Expand All @@ -20,7 +21,7 @@ class Migration(migrations.Migration):
('message', models.TextField()),
('created_at', models.DateTimeField(auto_now_add=True)),
('last_modified', models.DateTimeField(auto_now=True)),
('content_type', models.ForeignKey(to='contenttypes.ContentType')),
('content_type', models.ForeignKey(to='contenttypes.ContentType', on_delete=django.db.models.deletion.SET_NULL)),
],
),
]
2 changes: 1 addition & 1 deletion dj_elastictranscoder/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class EncodeJob(models.Model):
(4, 'Complete'),
)
id = models.CharField(max_length=100, primary_key=True)
content_type = models.ForeignKey(ContentType)
content_type = models.ForeignKey(ContentType, on_delete=models.SET_NULL)
object_id = models.PositiveIntegerField()
state = models.PositiveIntegerField(choices=STATE_CHOICES, default=0, db_index=True)
content_object = GenericForeignKey()
Expand Down

0 comments on commit bc578f0

Please sign in to comment.