From b43b0b73d4cc61bd39fcab1630ce564ca1d6a4ec Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 20 Oct 2021 19:33:35 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Remove=20null=20from=20group.mem?= =?UTF-8?q?bers=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../0006_alter_researchgroup_members.py | 20 +++++++++++++++++++ backend/sophon/core/models.py | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 backend/sophon/core/migrations/0006_alter_researchgroup_members.py diff --git a/backend/sophon/core/migrations/0006_alter_researchgroup_members.py b/backend/sophon/core/migrations/0006_alter_researchgroup_members.py new file mode 100644 index 0000000..6bb2ad3 --- /dev/null +++ b/backend/sophon/core/migrations/0006_alter_researchgroup_members.py @@ -0,0 +1,20 @@ +# Generated by Django 3.2.7 on 2021-10-20 17:33 + +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ('core', '0005_auto_20211016_0136'), + ] + + operations = [ + migrations.AlterField( + model_name='researchgroup', + name='members', + field=models.ManyToManyField(blank=True, help_text='The users who belong to this group.', related_name='is_a_member_of', + to=settings.AUTH_USER_MODEL), + ), + ] diff --git a/backend/sophon/core/models.py b/backend/sophon/core/models.py index db9e108..c843abc 100644 --- a/backend/sophon/core/models.py +++ b/backend/sophon/core/models.py @@ -338,7 +338,7 @@ class ResearchGroup(SophonGroupModel): User, help_text="The users who belong to this group.", related_name="is_a_member_of", - blank=True, null=True, + blank=True, ) owner = models.ForeignKey(