Skip to content

Commit

Permalink
fix: Fixed the query fetching enterprise customer members (#2305)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcitro authored Dec 17, 2024
1 parent e5aa30b commit 3995cc1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion enterprise/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Your project description goes here.
"""

__version__ = "5.5.0"
__version__ = "5.5.1"
2 changes: 1 addition & 1 deletion enterprise/api/v1/views/enterprise_customer_members.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion enterprise/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3995cc1

Please sign in to comment.