]> 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:46:48 +0000 (17:46 +0100)
commita2f322dc4da15e4a37bfb882ac93f64365e65952
tree1ecb12fa093c59fb19a609908442213ad2cf110f
parent271537733ec0fe6e549527b076a3020c9e821570
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>
(cherry picked from commit 4470c13e93ccd22b298deb290935b57f37bd2f55)
patchwork/api/base.py
patchwork/api/check.py
patchwork/api/embedded.py
patchwork/tests/api/test_event.py