Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit 8d97d57

Browse files
Merge pull request #4 from mitodl/fix_aq_django_2
Provide support for Django 2.0+
2 parents 56eb85b + 68c3e95 commit 8d97d57

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: dj_elastictranscoder/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.9.6'
1+
__version__ = '0.9.7'

Diff for: dj_elastictranscoder/migrations/0001_initial.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from __future__ import unicode_literals
33

44
from django.db import models, migrations
5+
import django.db.models.deletion
56

67

78
class Migration(migrations.Migration):
@@ -20,7 +21,7 @@ class Migration(migrations.Migration):
2021
('message', models.TextField()),
2122
('created_at', models.DateTimeField(auto_now_add=True)),
2223
('last_modified', models.DateTimeField(auto_now=True)),
23-
('content_type', models.ForeignKey(to='contenttypes.ContentType')),
24+
('content_type', models.ForeignKey(to='contenttypes.ContentType', on_delete=django.db.models.deletion.CASCADE)),
2425
],
2526
),
2627
]

Diff for: dj_elastictranscoder/models.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from django.contrib.contenttypes.fields import GenericForeignKey
44

55

6-
76
class EncodeJob(models.Model):
87
STATE_CHOICES = (
98
(0, 'Submitted'),
@@ -13,7 +12,7 @@ class EncodeJob(models.Model):
1312
(4, 'Complete'),
1413
)
1514
id = models.CharField(max_length=100, primary_key=True)
16-
content_type = models.ForeignKey(ContentType)
15+
content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
1716
object_id = models.PositiveIntegerField()
1817
state = models.PositiveIntegerField(choices=STATE_CHOICES, default=0, db_index=True)
1918
content_object = GenericForeignKey()

0 commit comments

Comments
 (0)