]> git.ipfire.org Git - thirdparty/patchwork.git/commit
models: Use parent model to get comment's 'list_archive_url'
authorStephen Finucane <stephen@that.guru>
Sat, 20 Feb 2021 14:35:07 +0000 (14:35 +0000)
committerStephen Finucane <stephen@that.guru>
Sat, 20 Feb 2021 14:51:14 +0000 (14:51 +0000)
commit6c73a55c52ecd6d756901c9e9647fae57aceda01
tree4aa46e6b8e79e5527eb5840ce56c5eb646584541
parentefd9ab09baca8e018004dc0efb74ca009d46c5a3
models: Use parent model to get comment's 'list_archive_url'

We were attempting to retrieve the 'list_archive_url' attribute from the
'PatchComment' or 'CoverComment' instances, rather than the parent
'Patch' and 'Cover' object, respectively. Correct this and add plenty of
tests to prevent this regressing.

NOTE(stephenfin): Squashed in 5fe02b6a7444b40f705d1efe33e70a9a9ef36e0a
which added the release note for this fix.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: 02ffb1315 ("models: Add list archive lookup")
Closes: #391
(cherry picked from commit 93ff4db29262c0560122f61eadf78d9626def238)
patchwork/models.py
patchwork/tests/api/test_comment.py
patchwork/tests/api/test_project.py
patchwork/tests/utils.py
releasenotes/notes/issue-391-4088c856247f228e.yaml [new file with mode: 0644]