From a5208a1edb4e251bb84a3d24db8a0c1d7f35d9ff Mon Sep 17 00:00:00 2001 From: Saleem Latif Date: Fri, 7 Jul 2023 13:01:46 +0500 Subject: [PATCH] refactor: Replaced the deprecated NullBooleanField with BooleanField(null=True) --- CHANGELOG.rst | 4 ++++ consent/migrations/0005_auto_20230707_0755.py | 23 +++++++++++++++++++ consent/models.py | 2 +- enterprise/__init__.py | 2 +- 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 consent/migrations/0005_auto_20230707_0755.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1de30ba9a4..c5c0f55238 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,10 @@ Change Log Unreleased ---------- +[3.69.0] +-------- +refactor: Replaced the deprecated `NullBooleanField` with `BooleanField(null=True)` + [3.68.1] -------- fix: pick first object from CourseDetails diff --git a/consent/migrations/0005_auto_20230707_0755.py b/consent/migrations/0005_auto_20230707_0755.py new file mode 100644 index 0000000000..b76365ce47 --- /dev/null +++ b/consent/migrations/0005_auto_20230707_0755.py @@ -0,0 +1,23 @@ +# Generated by Django 3.2.18 on 2023-07-07 07:55 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('consent', '0004_datasharingconsenttextoverrides'), + ] + + operations = [ + migrations.AlterField( + model_name='datasharingconsent', + name='granted', + field=models.BooleanField(help_text='Whether consent is granted.', null=True), + ), + migrations.AlterField( + model_name='historicaldatasharingconsent', + name='granted', + field=models.BooleanField(help_text='Whether consent is granted.', null=True), + ), + ] diff --git a/consent/models.py b/consent/models.py index 443081c453..abbbd2a72e 100644 --- a/consent/models.py +++ b/consent/models.py @@ -209,7 +209,7 @@ class Meta: null=False, help_text=_("Name of the user whose consent state is stored.") ) - granted = models.NullBooleanField(help_text=_("Whether consent is granted.")) + granted = models.BooleanField(null=True, help_text=_("Whether consent is granted.")) @property def _exists(self): diff --git a/enterprise/__init__.py b/enterprise/__init__.py index ad74471075..a05ed9eb57 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,6 +2,6 @@ Your project description goes here. """ -__version__ = "3.68.1" +__version__ = "3.69.0" default_app_config = "enterprise.apps.EnterpriseConfig"