]> git.ipfire.org Git - thirdparty/patchwork.git/commit
api: do not fetch every patch in a patch detail view 404 (v2)
authorStephen Finucane <stephen@that.guru>
Wed, 24 Feb 2021 15:08:45 +0000 (15:08 +0000)
committerStephen Finucane <stephen@that.guru>
Wed, 24 Feb 2021 15:29:50 +0000 (15:29 +0000)
commitd58cff0a16f6f1d944d258ba29479f0dfb7f61e5
treef4202e41a333932ef84d14b4f69c18eb05a2f5db
parentf4ee6e8f83de0790096e30fa169b9d5c529ff029
api: do not fetch every patch in a patch detail view 404 (v2)

Commit 08c5856 fixed an issue whereby a 404 on the aforementioned URL
could result in a large DB query due to DRF attempting to populate the
'related' list box with all patches on the instance. That was
accidentally reverted in commit fe07f30. "Unrevert" this change.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: fe07f30 ("Remove 'PatchRelationSerializer'")
Closes: #397
(cherry picked from commit 79700f321335a2d7c649eb03932797af521942a0)
patchwork/api/patch.py