chore: simplify query

This commit is contained in:
Livio Bieri 2024-02-12 22:12:16 +01:00
parent 1065e8c2da
commit 20bd103ab3
1 changed files with 1 additions and 11 deletions

View File

@ -60,18 +60,8 @@ def get_self_feedback_evaluation(
# and check if we have to take them into account (course, feedback type, etc.)
for learning_unit in LearningUnit.objects.filter(
feedback_user=LearningUnitPerformanceFeedbackType.MENTOR_FEEDBACK.value,
course_category__course_id=course.id,
):
logger.debug(
"Relevant learning unit found for mentor dashboard",
learning_unit=learning_unit.id,
)
circle_page = learning_unit.get_parent()
circle = circle_page.specific
if circle.get_course() != course:
continue
feedbacks = SelfEvaluationFeedback.objects.filter(
learning_unit=learning_unit,
feedback_requester_user__in=participants,