Support deletion of users.

This commit is contained in:
Casper V. Kristensen 2019-11-21 16:47:16 +01:00
parent 7f7dfcd748
commit 5eb4444e1d
Signed by: caspervk
GPG key ID: 289CA03790535054
2 changed files with 20 additions and 1 deletions

View file

@ -0,0 +1,19 @@
# Generated by Django 2.2.6 on 2019-11-21 16:46
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('users', '0004_auto_20191121_0109'),
]
operations = [
migrations.AlterField(
model_name='user',
name='main',
field=models.OneToOneField(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='+', to='users.Character'),
),
]

View file

@ -33,7 +33,7 @@ class User(AbstractUser):
main = models.OneToOneField( main = models.OneToOneField(
"Character", "Character",
related_name="+", related_name="+",
on_delete=models.PROTECT, on_delete=models.CASCADE,
blank=True blank=True
) )