diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 7001af1e5a..34bb05babf 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,10 @@ Change Log Unreleased ---------- +[4.15.12] +--------- +* feat: update enterprise customer serializer to include active integration codes + [4.15.11] --------- * fix: support `force_enrollment` in serializers used by bulk enrollment (ENT-8788) diff --git a/enterprise/__init__.py b/enterprise/__init__.py index bb768c7a2f..dd9ab72816 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,4 +2,4 @@ Your project description goes here. """ -__version__ = "4.15.11" +__version__ = "4.15.12" diff --git a/enterprise/api/v1/serializers.py b/enterprise/api/v1/serializers.py index 3cfec2e1d1..2a4986c0ab 100644 --- a/enterprise/api/v1/serializers.py +++ b/enterprise/api/v1/serializers.py @@ -35,6 +35,7 @@ from enterprise.utils import ( CourseEnrollmentDowngradeError, CourseEnrollmentPermissionError, + get_integrations_for_customers, get_last_course_run_end_date, has_course_run_available_for_enrollment, track_enrollment, @@ -223,7 +224,7 @@ class Meta: 'modified', 'enable_universal_link', 'enable_browse_and_request', 'admin_users', 'enable_career_engagement_network_on_learner_portal', 'career_engagement_network_message', 'enable_pathways', 'enable_programs', 'enable_demo_data_for_analytics_and_lpr', 'enable_academies', - 'enable_one_academy', + 'enable_one_academy', 'active_integrations', ) identity_providers = EnterpriseCustomerIdentityProviderSerializer(many=True, read_only=True) @@ -232,6 +233,10 @@ class Meta: enterprise_customer_catalogs = serializers.SerializerMethodField() enterprise_notification_banner = serializers.SerializerMethodField() admin_users = serializers.SerializerMethodField() + active_integrations = serializers.SerializerMethodField() + + def get_active_integrations(self, obj): + return get_integrations_for_customers(obj.uuid) def get_branding_configuration(self, obj): """ diff --git a/enterprise/utils.py b/enterprise/utils.py index 0a7f87efa7..502c203767 100644 --- a/enterprise/utils.py +++ b/enterprise/utils.py @@ -6,6 +6,7 @@ import json import os import re +from collections import OrderedDict from urllib.parse import parse_qs, quote, urlencode, urljoin, urlparse, urlsplit, urlunsplit from uuid import UUID, uuid4 @@ -2417,3 +2418,50 @@ def convert_to_snake(string): Helper method to convert strings to snake case. """ return re.sub(r'(?