chore: simplify query
This commit is contained in:
parent
1065e8c2da
commit
20bd103ab3
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue