Change DO_NOTHING to SET_NULL

reminder
Etzelia 2019-02-01 18:56:40 +01:00
parent 681a585818
commit da66751986
1 changed files with 2 additions and 2 deletions

View File

@ -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)