diff --git a/scipost/migrations/0015_contributor_profile.py b/scipost/migrations/0015_contributor_profile.py new file mode 100644 index 0000000000000000000000000000000000000000..16640f4401bc3273dcf3f1d87363a9181a2070cb --- /dev/null +++ b/scipost/migrations/0015_contributor_profile.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.4 on 2018-09-29 10:48 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('profiles', '0002_auto_20180916_1643'), + ('scipost', '0014_auto_20180414_2218'), + ] + + operations = [ + migrations.AddField( + model_name='contributor', + name='profile', + field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='profiles.Profile'), + ), + ] diff --git a/scipost/models.py b/scipost/models.py index 69cb8fbca472b2e32b89b9eb329d3896aff453e6..6e183d55806a5e0810238b82c98f43530087ce04 100644 --- a/scipost/models.py +++ b/scipost/models.py @@ -42,7 +42,8 @@ class Contributor(models.Model): All *science* users of SciPost are Contributors. username, password, email, first_name and last_name are inherited from User. """ - + profile = models.OneToOneField('profiles.Profile', on_delete=models.PROTECT, + null=True, blank=True) user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.PROTECT, unique=True) invitation_key = models.CharField(max_length=40, blank=True) activation_key = models.CharField(max_length=40, blank=True)