]> 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:49:38 +0000 (18:49 +0000)
commita43d6acda0939c14e8135549968815876680d497
tree11442a8334ed87b1ce83201a96631f1cb6a00c71
parenta51e7cfd95e24d6757a146e9c8e8f3aec44b226c
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")
patchwork/models.py
patchwork/tests/test_detail.py
patchwork/views/patch.py