From 89db4a0cb53ae01d1903b827ee9a80a8db59c509 Mon Sep 17 00:00:00 2001 From: Hamzah Ullah Date: Mon, 15 Jul 2024 19:56:05 +0000 Subject: [PATCH] fix: Add CountryFieldMixin to the EnterpriseCustomer serializer --- CHANGELOG.rst | 4 ++++ enterprise/__init__.py | 2 +- enterprise/api/v1/serializers.py | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index c02b3436c..fce17039a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,10 @@ Unreleased ---------- * nothing unreleased +[4.21.6] +--------- +* fix: Add CountryFieldMixin to the EnterpriseCustomer serializer + [4.21.5] --------- * feat: allow PAs to access all enterprise customers diff --git a/enterprise/__init__.py b/enterprise/__init__.py index 6eb5bd61f..9309dfdb9 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,4 +2,4 @@ Your project description goes here. """ -__version__ = "4.21.5" +__version__ = "4.21.6" diff --git a/enterprise/api/v1/serializers.py b/enterprise/api/v1/serializers.py index 7d9ffaa33..7d7515224 100644 --- a/enterprise/api/v1/serializers.py +++ b/enterprise/api/v1/serializers.py @@ -8,6 +8,7 @@ from collections.abc import Iterable import pytz +from django_countries.serializers import CountryFieldMixin from edx_rest_api_client.exceptions import HttpClientError from oauth2_provider.generators import generate_client_id, generate_client_secret from rest_framework import serializers @@ -204,7 +205,7 @@ def to_internal_value(self, data): raise serializers.ValidationError({"domain": "No Site with the provided domain was found."}) from exc -class EnterpriseCustomerSerializer(serializers.ModelSerializer): +class EnterpriseCustomerSerializer(CountryFieldMixin, serializers.ModelSerializer): """ Serializer for EnterpriseCustomer model. """