Skip to content
Snippets Groups Projects
Unverified Commit 21f52130 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Make user a 1:1 relationship.

parent d9b7e3a8
No related branches found
No related tags found
No related merge requests found
# Generated by Django 2.2.3 on 2019-07-30 20:48
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0009_person_user'),
]
operations = [
migrations.AlterField(
model_name='person',
name='user',
field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='person', to=settings.AUTH_USER_MODEL),
),
]
......@@ -22,7 +22,7 @@ class Person(SchoolRelated):
('m', _('male'))
]
user = models.ForeignKey(
user = models.OneToOneField(
get_user_model(), on_delete=models.SET_NULL, blank=True, null=True,
related_name='person')
is_active = models.BooleanField(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment