]> 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:44:37 +0000 (14:44 +0000)
commit93ff4db29262c0560122f61eadf78d9626def238
tree291610ae827319431599eeead63c4514600745d0
parente8f3b10484e3f18b6c0086c34ae9918c2bdb9966
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.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: 02ffb1315 ("models: Add list archive lookup")
Closes: #391
patchwork/models.py
patchwork/tests/api/test_comment.py
patchwork/tests/api/test_project.py
patchwork/tests/utils.py