]> 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:55:47 +0000 (14:55 +0000)
commitb170a825993b2a840e3477c1470811d563746f2c
treeee2901b75b0ed47ecf480cfb9fe0ba6d0d7423f6
parent5c03cbe0de1b7805089d54c961c165abafe9e5f5
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.

Conflicts:
  patchwork/models.py

Changes:
  patchwork/tests/api/test_comment.py

NOTE(stephenfin): Conflicts and changes are necessary to deal with the
fact we have a single comment model instead of two comment models as in
stable/3.0.

Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: 02ffb1315 ("models: Add list archive lookup")
Closes: #391
(cherry picked from commit 93ff4db29262c0560122f61eadf78d9626def238)
(cherry picked from commit 6c73a55c52ecd6d756901c9e9647fae57aceda01)
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]