From bb9c50279eb6798bf5368f7ca27d9dca2659e097 Mon Sep 17 00:00:00 2001 From: "manoj.p3" Date: Mon, 26 Aug 2024 09:51:20 +0530 Subject: [PATCH] user retrival by username --- lms/djangoapps/discussion/rest_api/api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/discussion/rest_api/api.py b/lms/djangoapps/discussion/rest_api/api.py index 076c518eef2f..54f4cf5842e1 100644 --- a/lms/djangoapps/discussion/rest_api/api.py +++ b/lms/djangoapps/discussion/rest_api/api.py @@ -1882,7 +1882,7 @@ def get_course_discussion_user_stats( course_stats_response = get_course_user_stats(course_key, params) for user_stat in course_stats_response["user_stats"]: - user_stat["user_first_name"] = User.objects.get(user_stat["username"]).first_name + user_stat["user_first_name"] = User.objects.get(username=user_stat["username"]).first_name if comma_separated_usernames: updated_course_stats = add_stats_for_users_with_no_discussion_content(