diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 58c97197b..dd1d451ad 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,10 @@ Unreleased ---------- * nothing unreleased +[5.5.1] +-------- +* fix: Fixed the query fetching enterprise customer members + [5.5.0] ------- * feat: introduce Waffle flag for enabling the Learner Portal BFF API. diff --git a/enterprise/__init__.py b/enterprise/__init__.py index 961aea59c..42f110a41 100644 --- a/enterprise/__init__.py +++ b/enterprise/__init__.py @@ -2,4 +2,4 @@ Your project description goes here. """ -__version__ = "5.5.0" +__version__ = "5.5.1" diff --git a/enterprise/api/v1/views/enterprise_customer_members.py b/enterprise/api/v1/views/enterprise_customer_members.py index ca292aa4c..2c6437671 100644 --- a/enterprise/api/v1/views/enterprise_customer_members.py +++ b/enterprise/api/v1/views/enterprise_customer_members.py @@ -78,7 +78,7 @@ def get_members(self, request, *args, **kwargs): au.id, au.email, au.date_joined, - coalesce(NULLIF(aup.name, ''), (au.first_name || ' ' || au.last_name)) as full_name + coalesce(NULLIF(aup.name, ''), au.username) as full_name FROM enterprise_enterprisecustomeruser ecu INNER JOIN auth_user as au on ecu.user_id = au.id LEFT JOIN auth_userprofile as aup on au.id = aup.user_id diff --git a/enterprise/models.py b/enterprise/models.py index 6e559fc63..3971c5697 100644 --- a/enterprise/models.py +++ b/enterprise/models.py @@ -4699,7 +4699,7 @@ def _get_filtered_ecu_ids(self, user_query): with users as ( select ecu.id, au.email, - coalesce(NULLIF(aup.name, ''), (au.first_name || ' ' || au.last_name)) as full_name + coalesce(NULLIF(aup.name, ''), au.username) as full_name from enterprise_enterprisecustomeruser ecu inner join auth_user au on ecu.user_id = au.id left join auth_userprofile aup on au.id = aup.user_id