From 62008ccc1765fe8c2c96dfcaa653cf761c4cee84 Mon Sep 17 00:00:00 2001 From: Kira Miller <31229189+kiram15@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:00:16 -0600 Subject: [PATCH] fix: make to-be-deleted field nullable (#2265) * fix: make to-be-deleted field nullable * fix: version bump --- CHANGELOG.rst | 4 ++++ enterprise/__init__.py | 2 +- ...egroup_applies_to_all_contexts_and_more.py | 23 +++++++++++++++++++ enterprise/models.py | 1 + 4 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 enterprise/migrations/0224_alter_enterprisegroup_applies_to_all_contexts_and_more.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 35fb7b99a..77b3b8154 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,10 @@ Unreleased ---------- * nothing unreleased +[4.28.1] +-------- +* feat: making to-be-deleted model field nullable + [4.28.0] -------- * feat: add default enrollment models diff --git a/enterprise/__init__.py b/enterprise/__init__.py index 495986fe5..49318e874 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,4 +2,4 @@ Your project description goes here. """ -__version__ = "4.28.0" +__version__ = "4.28.1" diff --git a/enterprise/migrations/0224_alter_enterprisegroup_applies_to_all_contexts_and_more.py b/enterprise/migrations/0224_alter_enterprisegroup_applies_to_all_contexts_and_more.py new file mode 100644 index 000000000..c18ec10ef --- /dev/null +++ b/enterprise/migrations/0224_alter_enterprisegroup_applies_to_all_contexts_and_more.py @@ -0,0 +1,23 @@ +# Generated by Django 4.2.16 on 2024-10-18 15:43 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('enterprise', '0223_default_enrollments'), + ] + + operations = [ + migrations.AlterField( + model_name='enterprisegroup', + name='applies_to_all_contexts', + field=models.BooleanField(default=False, help_text='When enabled, all learners connected to the org will be considered a member.', null=True, verbose_name='Set group membership to the entire org of learners.'), + ), + migrations.AlterField( + model_name='historicalenterprisegroup', + name='applies_to_all_contexts', + field=models.BooleanField(default=False, help_text='When enabled, all learners connected to the org will be considered a member.', null=True, verbose_name='Set group membership to the entire org of learners.'), + ), + ] diff --git a/enterprise/models.py b/enterprise/models.py index 3e85a3a45..71a5cac19 100644 --- a/enterprise/models.py +++ b/enterprise/models.py @@ -4500,6 +4500,7 @@ class EnterpriseGroup(TimeStampedModel, SoftDeletableModel): applies_to_all_contexts = models.BooleanField( verbose_name="Set group membership to the entire org of learners.", default=False, + null=True, help_text=_( "When enabled, all learners connected to the org will be considered a member." )