Fix API issues creating comments on draft file attachments.

Review Request #12962 — Created April 19, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This change fixes up a couple issues with the API making comments on
not-yet-published file attachments. The main problem here is that draft
attachments are related only to the draft and not yet to the review
request. This change fixes up the questios for both get_queryset and
create to handle this.

  • Ran unit tests.
  • Added some comments to file attachments which were not yet published.

Changes between revision 1 and 2

orig
1
2

Commits

Summary ID Author
Fix API issues creating comments on draft file attachments.
This change fixes up a couple issues with the API making comments on not-yet-published file attachments. The main problem here is that draft attachments are related only to the draft and not yet to the review request. This change fixes up the questios for both `get_queryset` and `create` to handle this. Testing Done: - Ran unit tests. - Added some comments to file attachments which were not yet published.
3844ba320d739ab0c068a46f0d6ec732445338ea David Trowbridge
Fix API issues creating comments on draft file attachments.
This change fixes up a couple issues with the API making comments on not-yet-published file attachments. The main problem here is that draft attachments are related only to the draft and not yet to the review request. This change fixes up the questios for both `get_queryset` and `create` to handle this. Testing Done: - Ran unit tests. - Added some comments to file attachments which were not yet published.
8908d2b022c1a6455805c8f60cd7a9244ff8d4df David Trowbridge
reviewboard/webapi/tests/test_file_attachment_comment.py
Loading...