]> git.ipfire.org Git - thirdparty/patchwork.git/commit
REST: Fix duplicate project queries
authorMete Polat <metepolat2000@gmail.com>
Wed, 29 Jan 2020 19:01:22 +0000 (20:01 +0100)
committerStephen Finucane <stephen@that.guru>
Sun, 2 Feb 2020 10:49:26 +0000 (10:49 +0000)
commitec00daae4d79bf2560034e1b2bc3cf76a98a3212
treeb22ee98d9a0283b3c219a94569e5640368e4a57d
parentab1c835fdf57e30effbc56ae6160bddb6969794c
REST: Fix duplicate project queries

Eliminates duplicate project queries caused by calling
get_absolute_url() in the embedded serializers. Following foreign keys
with 'series__project' will cache the project of the series as well as
the series itself.

Signed-off-by: Mete Polat <metepolat2000@gmail.com>
Signed-off-by: Stephen Finucane <stephen@that.guru>
Closes: #335
patchwork/api/cover.py
patchwork/api/event.py
patchwork/api/patch.py
patchwork/api/series.py
patchwork/tests/api/test_cover.py
patchwork/tests/api/test_event.py
patchwork/tests/api/test_patch.py
patchwork/tests/api/test_series.py