summaryrefslogtreecommitdiffstats
path: root/todolists
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@vdwaa.nl>2018-10-21 20:49:38 +0200
committerJelle van der Waa <jelle@vdwaa.nl>2018-11-17 15:38:12 +0100
commit9354c4407d495e30be71a5073171b8da8539665a (patch)
treebe43d7b8dc5f8cc0f8fcecc5db00cccd024caebc /todolists
parentfada6c3b435dfdbf36746ca7cfd79a4f137def6a (diff)
downloadarchweb-9354c4407d495e30be71a5073171b8da8539665a.tar.gz
archweb-9354c4407d495e30be71a5073171b8da8539665a.zip
Fix Foreignkey implicit on_delete on django < 2.0
Foreignkey used to implicitly be on_delete=models.CASCADE and has to be explicit now.
Diffstat (limited to 'todolists')
-rw-r--r--todolists/models.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/todolists/models.py b/todolists/models.py
index c22017bf..0627f833 100644
--- a/todolists/models.py
+++ b/todolists/models.py
@@ -54,12 +54,12 @@ class TodolistPackage(models.Model):
(IN_PROGRESS, 'In-progress'),
)
- todolist = models.ForeignKey(Todolist)
+ todolist = models.ForeignKey(Todolist, on_delete=models.CASCADE)
pkg = models.ForeignKey(Package, null=True, on_delete=models.SET_NULL)
pkgname = models.CharField(max_length=255)
pkgbase = models.CharField(max_length=255)
- arch = models.ForeignKey(Arch)
- repo = models.ForeignKey(Repo)
+ arch = models.ForeignKey(Arch, on_delete=models.CASCADE)
+ repo = models.ForeignKey(Repo, on_delete=models.CASCADE)
created = models.DateTimeField(editable=False)
last_modified = models.DateTimeField(editable=False)
removed = models.DateTimeField(null=True, blank=True)