]> 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)
committerDaniel Axtens <dja@axtens.net>
Fri, 20 Mar 2020 07:44:46 +0000 (18:44 +1100)
commitf40bcd03401084a9687a9b1f7a0c210eb2e7e42e
tree1c9ea26a4e92c2ad1596a37e3454b940e1b423fc
parent58051431a33f87f5bcec58c1fbdc7e0fcb26fdc6
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
(backported from commit ec00daae4d79bf2560034e1b2bc3cf76a98a3212
  dropped all the tests, they clash horribly)
Signed-off-by: Daniel Axtens <dja@axtens.net>
patchwork/api/cover.py
patchwork/api/event.py
patchwork/api/patch.py
patchwork/api/series.py