diff --git a/doc/release/RELEASE-NOTES.md b/doc/release/RELEASE-NOTES.md index d6ffdbcd6..7f38f3a31 100644 --- a/doc/release/RELEASE-NOTES.md +++ b/doc/release/RELEASE-NOTES.md @@ -13,9 +13,11 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html ### Database changes #### Migrations: * 0159_alter_status_of_moderation_events_table.py - This migration alters status of api_moderationevent table. +* 0160_allow_null_parsing_errors_in_facilitylist.py - This migration allows empty parsing_errors in api_facilitylist. #### Scheme changes * [OSDEV-1346](https://opensupplyhub.atlassian.net/browse/OSDEV-1346) - Alter status options for api_moderationevent table. +* [OSDEV-1411](https://opensupplyhub.atlassian.net/browse/OSDEV-1411) - Allows empty parsing_errors in api_facilitylist. ### Code/API changes * [OSDEV-1346](https://opensupplyhub.atlassian.net/browse/OSDEV-1346) - Create GET request for `v1/moderation-events` endpoint. @@ -27,7 +29,7 @@ to modify moderation event `status`. * Increased the memory for the Dedupe Hub instance from 8GB to 12GB in the `production` and `pre-prod` environments to reduce the risk of container overload and minimize the need for reindexing in the future. ### Bugfix -* *Describe bugfix here.* +* [OSDEV-1411](https://opensupplyhub.atlassian.net/browse/OSDEV-1411) - Django Admin: Fixed an issue when updating the facility list with an empty array in the `parsing errors` field. ### What's new * *Describe what's new here. The changes that can impact user experience should be listed in this section.* diff --git a/src/django/api/migrations/0160_allow_null_parsing_errors_in_facilitylist.py b/src/django/api/migrations/0160_allow_null_parsing_errors_in_facilitylist.py new file mode 100644 index 000000000..b6d72ec64 --- /dev/null +++ b/src/django/api/migrations/0160_allow_null_parsing_errors_in_facilitylist.py @@ -0,0 +1,19 @@ +# Generated by Django 3.2.17 on 2024-11-19 10:12 + +import django.contrib.postgres.indexes +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('api', '0159_alter_status_of_moderation_event_table'), + ] + + operations = [ + migrations.AlterField( + model_name='facilitylist', + name='parsing_errors', + field=models.JSONField(blank=True, default=list, help_text='List-level and internal errors logged during background parsing of the list.', null=True), + ), + ] diff --git a/src/django/api/models/facility/facility_list.py b/src/django/api/models/facility/facility_list.py index 299ae88e0..085e7c924 100644 --- a/src/django/api/models/facility/facility_list.py +++ b/src/django/api/models/facility/facility_list.py @@ -86,6 +86,8 @@ class FacilityList(models.Model): related_name='approver_of_list') parsing_errors = JSONField( default=list, + null=True, + blank=True, help_text=('List-level and internal errors logged during background ' 'parsing of the list.') )