Skip to content

Commit ab47e96

Browse files
committed
Fix pagination of Builds on build list page.
A change in the Django Filter project made it so the previous method didn't work. We aren't currently using the filters, so we should probably remove them for simplicity, but this fixes the main issue.
1 parent ae67af4 commit ab47e96

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

readthedocs/builds/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def get_context_data(self, **kwargs):
4242
context['filter'] = filter
4343
context['active_builds'] = active_builds
4444
context['versions'] = Version.objects.public(user=self.request.user, project=self.project)
45+
context['build_qs'] = filter.qs
4546

4647
try:
4748
redis = Redis.from_url(settings.BROKER_URL)

readthedocs/templates/builds/build_list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ <h3>
4545

4646
<div id="build_list">
4747

48-
{% autopaginate filter.qs 15 %}
48+
{% autopaginate build_qs 15 %}
4949

5050
<!-- BEGIN builds list -->
5151
<div class="module">

readthedocs/templates/core/build_list_detailed.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% load i18n %}
22
{% load static %}
33

4-
{% for build in filter.qs %}
4+
{% for build in build_qs %}
55
<li class="module-item col-span">
66
<div id="build-{{ build.id }}">
77
<a href="{{ build.get_absolute_url }}"><span id="build-state">{% if build.state != 'finished' %}{{ build.get_state_display }} {% else %} {% if build.success %}{% trans "Passed" %}{% else %}{% trans "Failed" %}{% endif %}{% endif %}</span>

0 commit comments

Comments
 (0)