diff options
| author | Magnus Hagander | 2020-04-01 12:15:07 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2020-04-01 12:15:07 +0000 |
| commit | 380b00e130f62bb9a16e029bf1d11a7649d0bd09 (patch) | |
| tree | 6d8e6311cc21fe614b22c183788a05807ec5ebc9 /postgresqleu/paypal | |
| parent | 76e0d297f37281025cf4170238521840b9fe3987 (diff) | |
Specify on_delete for all ForeignKey and OneToOneFields
This was already done once in 8289e05cd but had not been properly
maintained.
Diffstat (limited to 'postgresqleu/paypal')
| -rw-r--r-- | postgresqleu/paypal/models.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/postgresqleu/paypal/models.py b/postgresqleu/paypal/models.py index d1190d50..f3e8c004 100644 --- a/postgresqleu/paypal/models.py +++ b/postgresqleu/paypal/models.py @@ -15,7 +15,7 @@ class TransactionInfo(models.Model): transtext = models.CharField(max_length=1000, null=False, blank=False) matched = models.BooleanField(null=False, blank=False) matchinfo = models.CharField(max_length=1000, null=True, blank=True) - paymentmethod = models.ForeignKey(InvoicePaymentMethod, blank=False, null=False) + paymentmethod = models.ForeignKey(InvoicePaymentMethod, blank=False, null=False, on_delete=models.CASCADE) def setmatched(self, msg): self.matched = True @@ -27,4 +27,4 @@ class ErrorLog(models.Model): timestamp = models.DateTimeField(null=False, blank=False) message = models.TextField(null=False, blank=False) sent = models.BooleanField(null=False, blank=False) - paymentmethod = models.ForeignKey(InvoicePaymentMethod, blank=True, null=True) + paymentmethod = models.ForeignKey(InvoicePaymentMethod, blank=True, null=True, on_delete=models.CASCADE) |
