From da667519861faa49c85edf3084759dea1fa5d908 Mon Sep 17 00:00:00 2001 From: Etzelia Date: Fri, 1 Feb 2019 18:56:40 +0100 Subject: [PATCH] Change DO_NOTHING to SET_NULL --- models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models.py b/models.py index 7c24ea0..5495022 100644 --- a/models.py +++ b/models.py @@ -94,10 +94,10 @@ class Application(models.Model): class Player(models.Model): - auth_user = models.OneToOneField(User, on_delete=models.DO_NOTHING, null=True, blank=True) + auth_user = models.OneToOneField(User, on_delete=models.SET_NULL, null=True, blank=True) uuid = models.CharField(max_length=36, unique=True) username = models.CharField(max_length=20) - application = models.ForeignKey(Application, on_delete=models.DO_NOTHING, null=True, blank=True) + application = models.ForeignKey(Application, on_delete=models.SET_NULL, null=True, blank=True) first_seen = models.DateField(null=True, blank=True) last_seen = models.DateField(null=True, blank=True)