]> git.ipfire.org Git - thirdparty/patchwork.git/commit
REST: De-duplicate handling of nested resource URLs
authorStephen Finucane <stephen@that.guru>
Fri, 30 Sep 2022 13:57:25 +0000 (14:57 +0100)
committerStephen Finucane <stephen@that.guru>
Fri, 30 Sep 2022 16:38:54 +0000 (17:38 +0100)
commit4470c13e93ccd22b298deb290935b57f37bd2f55
tree0d72aba903235f0922d8594bfa0cdd4bfc37edad
parentd05a2ff9b97e233036c7cc86e8cfbdccc3d313a0
REST: De-duplicate handling of nested resource URLs

These were all doing the same thing. Make things more generic.

We also speed up test (inadvertently) by using the 'patch_id' attribute
of the 'Check' model rather than 'patch.id', thus avoiding the JOIN.

Signed-off-by: Stephen Finucane <stephen@that.guru>
patchwork/api/base.py
patchwork/api/check.py
patchwork/api/embedded.py
patchwork/tests/api/test_event.py