From 472618022bb43bbd849eea1b490c7a1afc945b35 Mon Sep 17 00:00:00 2001 From: Marlon Keating Date: Thu, 8 Aug 2024 17:41:02 +0000 Subject: [PATCH] fix: add missing migration for content_filter help text docs: remove unneeded bullet points from ADR --- CHANGELOG.rst | 4 ++++ .../0014-enterprise-catalog-sync-catalogs.rst | 6 ++--- enterprise/__init__.py | 2 +- ...r_enterprisecatalogquery_content_filter.py | 22 +++++++++++++++++++ 4 files changed, 30 insertions(+), 4 deletions(-) create mode 100644 enterprise/migrations/0219_alter_enterprisecatalogquery_content_filter.py diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f1396120e..5593088e2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,10 @@ Unreleased ---------- * nothing unreleased +[4.23.3] +--------- +* fix: add missing migration for content_filter help text + [4.23.2] --------- * test: pii check stage actually checks PII instead of not at all. diff --git a/docs/decisions/0014-enterprise-catalog-sync-catalogs.rst b/docs/decisions/0014-enterprise-catalog-sync-catalogs.rst index 5edc7b010..e1c750b86 100644 --- a/docs/decisions/0014-enterprise-catalog-sync-catalogs.rst +++ b/docs/decisions/0014-enterprise-catalog-sync-catalogs.rst @@ -14,7 +14,7 @@ We would like to have a way to reuse a saved set of courses configured by a quer Decisions ========= -- **Sync catalog/customer data with enterprise-catalog** +**Sync catalog/customer data with enterprise-catalog** As the catalog data is saved in both edx-enterprise and enterprise-catalog, we need to make sure that catalog data is consistent across both. In the context of edx-enterprise, changes to EnterpriseCatalogQuery and EnterpriseCustomerCatalog will be propagated to their counterparts in the enterprise-catalog service. @@ -23,7 +23,7 @@ in the enterprise-catalog service. Consequences ============ -- **EnterpriseCatalogQuery Sync Process** +**EnterpriseCatalogQuery Sync Process** The enterprise-catalog service enforces a uniqueness constraint for the `content_filter` field, and so edx-enterprise must enforce it as well or the sync operation will fail and the entities will be out of sync with each other. @@ -35,7 +35,7 @@ them to enterprise-catalog. If the `content_filter` is *not* unique, we display an error on the EnterpriseCatalogQuery edit page and don't commit the change. -- **EnterpriseCustomerCatalog Sync Process** +**EnterpriseCustomerCatalog Sync Process** In the Django Admin console, whenever a EnterpriseCustomerCatalog is created, or an existing one is edited, we simply pass the changes on to enterprise-catalog without doing any checks for duplicates. diff --git a/enterprise/__init__.py b/enterprise/__init__.py index 762c496dc..2ddd42912 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,4 +2,4 @@ Your project description goes here. """ -__version__ = "4.23.2" +__version__ = "4.23.3" diff --git a/enterprise/migrations/0219_alter_enterprisecatalogquery_content_filter.py b/enterprise/migrations/0219_alter_enterprisecatalogquery_content_filter.py new file mode 100644 index 000000000..97cbdb3ed --- /dev/null +++ b/enterprise/migrations/0219_alter_enterprisecatalogquery_content_filter.py @@ -0,0 +1,22 @@ +# Generated by Django 4.2.15 on 2024-08-08 17:29 + +import collections +from django.db import migrations +import enterprise.validators +import jsonfield.encoder +import jsonfield.fields + + +class Migration(migrations.Migration): + + dependencies = [ + ('enterprise', '0218_add_provisioning_admin_role'), + ] + + operations = [ + migrations.AlterField( + model_name='enterprisecatalogquery', + name='content_filter', + field=jsonfield.fields.JSONField(blank=True, default={}, dump_kwargs={'cls': jsonfield.encoder.JSONEncoder, 'indent': 4, 'separators': (',', ':')}, help_text="Query parameters which will be used to filter the discovery service's search/all endpoint results, specified as a JSON object. An empty JSON object means that all available content items will be included in the catalog. Must be unique.", load_kwargs={'object_pairs_hook': collections.OrderedDict}, null=True, validators=[enterprise.validators.validate_content_filter_fields]), + ), + ]