~sircmpwn/builds.sr.ht

e5d07a81f805515c5d473bf249016bbd3c24c918 — Ignas Kiela 11 days ago 5fa5b36 0.66.4
Prefetch job tasks even if search fails
1 files changed, 2 insertions(+), 2 deletions(-)

M buildsrht/blueprints/jobs.py
M buildsrht/blueprints/jobs.py => buildsrht/blueprints/jobs.py +2 -2
@@ 94,11 94,11 @@ def jobs_page(jobs, sidebar="sidebar.html", **kwargs):
    search_error = None

    try:
        jobs = (get_jobs(jobs, search)
            .options(sa.orm.joinedload(Job.tasks)))
        jobs = (get_jobs(jobs, search))
    except ValueError as ex:
        search_error = str(ex)

    jobs = jobs.options(sa.orm.joinedload(Job.tasks))
    jobs, pagination = paginate_query(jobs)
    return render_template("jobs.html",
        jobs=jobs, status_map=status_map, icon_map=icon_map, tags=tags,