django2.2: add default mandatory on_delete on all ForeignKey

This commit is contained in:
2019-10-05 19:05:56 +02:00
parent 2616e8b24c
commit 4dadb1dbc0
14 changed files with 300 additions and 72 deletions

View File

@ -50,7 +50,9 @@ def validate_payment(value):
class Subscription(models.Model):
member = models.ForeignKey(User, related_name="subscriptions")
member = models.ForeignKey(
User, related_name="subscriptions", on_delete=models.CASCADE
)
subscription_type = models.CharField(
_("subscription type"),
max_length=255,