From 8289e05cd549e3f7f137e8b0336b29f81fe23ed5 Mon Sep 17 00:00:00 2001 From: Vik Fearing Date: Fri, 7 Sep 2018 16:29:10 -0700 Subject: Specify on_delete parameter for all ForeignKeys This will be required in future Django versions, and currently throws deprecation warnings. --- postgresqleu/trustlypayment/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'postgresqleu/trustlypayment/models.py') diff --git a/postgresqleu/trustlypayment/models.py b/postgresqleu/trustlypayment/models.py index 13dc54c2..2de9061f 100644 --- a/postgresqleu/trustlypayment/models.py +++ b/postgresqleu/trustlypayment/models.py @@ -22,7 +22,7 @@ class TrustlyRawNotification(models.Model): class TrustlyNotification(models.Model): receivedat = models.DateTimeField(null=False, blank=False, auto_now_add=True, unique=True) - rawnotification = models.ForeignKey(TrustlyRawNotification, null=True, blank=True) + rawnotification = models.ForeignKey(TrustlyRawNotification, null=True, blank=True, on_delete=models.CASCADE) notificationid = models.BigIntegerField(null=False, blank=False) orderid = models.BigIntegerField(null=False, blank=False) method = models.CharField(max_length=80, null=False, blank=False) -- cgit v1.2.3