]> git.ipfire.org Git - thirdparty/patchwork.git/commit
Only show unique checks
authorStephen Finucane <stephen@that.guru>
Sat, 6 Mar 2021 14:54:59 +0000 (14:54 +0000)
committerStephen Finucane <stephen@that.guru>
Sun, 7 Mar 2021 18:58:18 +0000 (18:58 +0000)
commitf4ff605eb449ea56b265ee7a5a516b48d83a5eb0
tree75372919cfb6811a7db0e58300b0c788001a0d5f
parentd5b10d48d01710ca1857e5f1afa0f7ef1d61953e
Only show unique checks

Commit e5c641fc4 optimized fetching of checks when displaying a patch by
prefetching these checks ahead of time. Unfortunately we missed that
this should exclude older versions of checks for a given context. Make
the code used to generate the unique checks generic and allow us to use
that as a filter to the checks provided to the template, restoring the
correct behavior.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #398
Fixes: e5c641fc4 ("Optimise fetching checks when displaying a patch")
(cherry picked from commit a43d6acda0939c14e8135549968815876680d497)
patchwork/models.py
patchwork/tests/test_detail.py
patchwork/views/patch.py