From 1e642e54e522bf3fb427cdc93b46b725a2dd2ba1 Mon Sep 17 00:00:00 2001 From: muhammad-ammar Date: Thu, 12 Oct 2023 11:36:52 +0500 Subject: [PATCH] fix: Make `contract_end_date` nullable in `EnterpriseAdminSummarizeInsights` model --- CHANGELOG.rst | 4 ++++ enterprise_data/__init__.py | 2 +- ...adminsummarizeinsights_contract_end_date.py | 18 ++++++++++++++++++ enterprise_data/models.py | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 enterprise_data/migrations/0038_alter_enterpriseadminsummarizeinsights_contract_end_date.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 03011427..3c3da4fa 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,10 @@ Unreleased ---------- ========================= +[5.4.2] - 2023-10-12 +--------------------- + * Make `contract_end_date` nullable in `EnterpriseAdminSummarizeInsights` model + [5.4.1] - 2023-09-22 --------------------- * Update NullBooleanField for Django 4.2 support diff --git a/enterprise_data/__init__.py b/enterprise_data/__init__.py index e9246a5a..eca3438c 100644 --- a/enterprise_data/__init__.py +++ b/enterprise_data/__init__.py @@ -2,4 +2,4 @@ Enterprise data api application. This Django app exposes API endpoints used by enterprises. """ -__version__ = "5.4.1" +__version__ = "5.4.2" diff --git a/enterprise_data/migrations/0038_alter_enterpriseadminsummarizeinsights_contract_end_date.py b/enterprise_data/migrations/0038_alter_enterpriseadminsummarizeinsights_contract_end_date.py new file mode 100644 index 00000000..570bff70 --- /dev/null +++ b/enterprise_data/migrations/0038_alter_enterpriseadminsummarizeinsights_contract_end_date.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.20 on 2023-10-12 06:36 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('enterprise_data', '0037_alter_enterpriseenrollment_consent_granted'), + ] + + operations = [ + migrations.AlterField( + model_name='enterpriseadminsummarizeinsights', + name='contract_end_date', + field=models.DateTimeField(help_text='Contract end date', null=True), + ), + ] diff --git a/enterprise_data/models.py b/enterprise_data/models.py index 02340c7f..9574131d 100644 --- a/enterprise_data/models.py +++ b/enterprise_data/models.py @@ -200,7 +200,7 @@ class Meta: ) hours = models.PositiveIntegerField(help_text='Total number of learning hours in last 30 days') hours_prior = models.PositiveIntegerField(help_text='Total number of learning hours in last 31-60 days') - contract_end_date = models.DateTimeField(help_text='Contract end date') + contract_end_date = models.DateTimeField(help_text='Contract end date', null=True) active_contract = models.BooleanField(help_text='Whether or not the customer has a contract?') created_at = models.DateTimeField()