diff --git a/cfl_common/common/migrations/0045_auto_20230927_1004.py b/cfl_common/common/migrations/0045_auto_20230927_1004.py new file mode 100644 index 000000000..dd7011cf1 --- /dev/null +++ b/cfl_common/common/migrations/0045_auto_20230927_1004.py @@ -0,0 +1,26 @@ +# Generated by Django 3.2.20 on 2023-09-27 09:04 + +from django.conf import settings +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('common', '0044_update_activity_models'), + ] + + operations = [ + migrations.AddField( + model_name='userprofile', + name='enabled_auth_factor_csv', + field=models.TextField(default=''), + ), + migrations.AlterField( + model_name='userprofile', + name='user', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/cfl_common/common/models.py b/cfl_common/common/models.py index cb2c7ee9d..6682c4b3e 100644 --- a/cfl_common/common/models.py +++ b/cfl_common/common/models.py @@ -12,9 +12,14 @@ class UserProfile(models.Model): - user = models.OneToOneField(User, on_delete=models.CASCADE) - developer = models.BooleanField(default=False) + user = models.OneToOneField( + User, + related_name="profile", + on_delete=models.CASCADE, + ) + enabled_auth_factor_csv = models.TextField(default="") + developer = models.BooleanField(default=False) is_verified = models.BooleanField(default=False) # Holds the user's earned kurono badges. This information has to be on the UserProfile as the Avatar objects are