Fix the "watched list" resource.

Review Request #14258 — Created Dec. 4, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

The watched list resource is a special resource that exists only to link
to the other watched item resources. It was completely broken, returning
HTTP 405, due to a bad implementation of our singleton resource pattern.

This change fixes that up to use the correct method name, and
reimplements the body of it to skip the bulk of what the base get_list
implementation would have done.

Fetched the watched list resource and got a response with links instead
of an error.

Diff Revision 6 (Latest)

orig
1
2
3
4
5
6

Commits

First Last Summary ID Author
Fix the "watched list" resource.
The watched list resource is a special resource that exists only to link to the other watched item resources. It was completely broken, returning HTTP 405, due to a bad implementation of our singleton resource pattern. This change fixes that up to use the correct method name, and reimplements the body of it to skip the bulk of what the base `get_list` implementation would have done. Testing Done: Fetched the watched list resource and got a response with links instead of an error.
97b09c6277a60f9b5b5a0d46e09da0bd3de15fa4 David Trowbridge
reviewboard/webapi/resources/watched.py
reviewboard/webapi/tests/mimetypes.py
reviewboard/webapi/tests/test_watched.py
reviewboard/webapi/tests/urls.py
Loading...