forked from Minecraft/minecraft_manager
Change DO_NOTHING to SET_NULL
parent
681a585818
commit
da66751986
|
@ -94,10 +94,10 @@ class Application(models.Model):
|
||||||
|
|
||||||
|
|
||||||
class Player(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)
|
uuid = models.CharField(max_length=36, unique=True)
|
||||||
username = models.CharField(max_length=20)
|
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)
|
first_seen = models.DateField(null=True, blank=True)
|
||||||
last_seen = models.DateField(null=True, blank=True)
|
last_seen = models.DateField(null=True, blank=True)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue