Skip to content

Commit aca2139

Browse files
authored
Project: use new field for sorting (#12398)
ref #12392
1 parent 6d4243e commit aca2139

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readthedocs/projects/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def filter(self, qs, value):
127127
field = field_ordered.lstrip("-")
128128

129129
if field == self.SORT_BUILD_DATE:
130-
annotations[self.SORT_BUILD_DATE] = Max("builds__date")
130+
annotations[self.SORT_BUILD_DATE] = F("latest_build__date")
131131
elif field == self.SORT_BUILD_COUNT:
132132
annotations[self.SORT_BUILD_COUNT] = Count("builds")
133133

0 commit comments

Comments
 (0)