Skip to content

Commit 8c6a091

Browse files
committed
Исправлен результат поля scored_expert_id, теперь возвращает корректную информацию о id пользователя, сделавшего оценку
1 parent 172b6e1 commit 8c6a091

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

project_rates/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def get_queryset(self) -> QuerySet[Project]:
100100
# `Count` the easiest way to check for rate exist (0 -> does not exist).
101101
scored_expert_subquery = ProjectScore.objects.filter(
102102
project=OuterRef("pk")
103-
).values("user__expert__id")[:1]
103+
).values("user_id")[:1]
104104

105105
return Project.objects.filter(draft=False, id__in=projects_ids).annotate(
106106
scored=Count("scores"),

0 commit comments

Comments
 (0)