Fix API issues creating comments on draft diffs.

Review Request #12946 — Created April 12, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This change fixes up a few issues with the API making comments on
not-yet-published diffs. The main problem here is that the DiffSet is not
added to the review request's DiffSetHistory until it is published. This
change fixes up the queries for both get_queryset and create to
handle this.

  • Ran unit tests.
  • Added some comments to a diff that was not yet published.

Diff Revision 3 (Latest)

orig
1
2
3

Commits

First Last Summary ID Author
Fix API issues creating comments on draft diffs.
This change fixes up a few issues with the API making comments on not-yet-published diffs. The main problem here is that the DiffSet is not added to the review request's DiffSetHistory until it is published. This change fixes up the queries for both `get_queryset` and `create` to handle this. Testing Done: - Ran unit tests. - Added some comments to a diff that was not yet published.
d9877780a65c0e2cad0bfc4755cd8063087fe0f8 David Trowbridge
reviewboard/webapi/resources/base_diff_comment.py
reviewboard/webapi/resources/review_diff_comment.py
reviewboard/webapi/tests/test_review_comment.py
Loading...