fix: corrects total_responses for feedback count
This commit is contained in:
parent
4b2fa46eee
commit
cb5f9fedc4
|
|
@ -43,6 +43,7 @@ def feedback_responses(
|
|||
)
|
||||
|
||||
circle_feedbacks = []
|
||||
total_responses = 0
|
||||
|
||||
for course_session in course_sessions:
|
||||
fbs = FeedbackResponse.objects.filter(
|
||||
|
|
@ -51,6 +52,8 @@ def feedback_responses(
|
|||
feedback_user__in=feedback_users(course_session.id),
|
||||
)
|
||||
|
||||
total_responses += len(fbs)
|
||||
|
||||
circle_feedbacks.extend(
|
||||
circle_feedback_average(
|
||||
feedbacks=fbs,
|
||||
|
|
@ -74,7 +77,7 @@ def feedback_responses(
|
|||
_id=course_id, # noqa
|
||||
satisfaction_average=avg, # noqa
|
||||
satisfaction_max=4, # noqa
|
||||
total_responses=len(circle_feedbacks), # noqa
|
||||
total_responses=total_responses, # noqa
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue