File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -342,7 +342,7 @@ class VirtualMovie(v.VirtualModel):
342
342
lambda qs , user , ** kwargs : qs.annotate(
343
343
Subquery(
344
344
UserMovieRating.objects.filter(
345
- movie_id = OuterRef(" pk" ),
345
+ movie = OuterRef(" pk" ),
346
346
user = user
347
347
).values(" rating" )[:1 ]
348
348
)
Original file line number Diff line number Diff line change @@ -101,7 +101,7 @@ def annotate_lessons_total(self):
101
101
# Instead, use SQCount:
102
102
return self .annotate (
103
103
lessons_total = SQCount (
104
- Lesson .objects .filter (course_id = OuterRef ("course_id" )),
104
+ Lesson .objects .filter (course = OuterRef ("course_id" )),
105
105
),
106
106
)
107
107
@@ -111,7 +111,7 @@ def annotate_lessons_completed_total(self):
111
111
# Instead, use SQCount:
112
112
return self .annotate (
113
113
lessons_completed_total = SQCount (
114
- CompletedLesson .objects .filter (assignment_id = OuterRef ("id" )),
114
+ CompletedLesson .objects .filter (assignment = OuterRef ("id" )),
115
115
),
116
116
)
117
117
You can’t perform that action at this time.
0 commit comments