Perform extra cleanup when review request drafts get discarded.

Review Request #13135 — Created July 13, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

This adds a handler for performing extra cleanup when review request drafts
get deleted. Right now the only thing that we do in the handler is delete all
draft file attachments that are being discarded alongside the draft. That
fixes a bug where discarding a review request draft that contained an
update to a file attachment would erase the entire file attachment from the
review request, rather than reverting the file attachment to its previously
published version. It also makes sense to not keep the draft file attachment
around, since it will never be published/accessed again after being discarded.

  • Ran unit tests
  • Made sure that the bug was fixed.

Changes between revision 2 and 4

orig
1
2
3
4
5

Commits

Summary ID Author
Perform extra cleanup when review request drafts get discarded.
bb500f8661b1a606eb78cab1a1b588886ee21747 Michelle Aubin
Perform extra cleanup when review request drafts get discarded.
929b982c6c32b5d2fe79c6b9680296fb8d722978 Michelle Aubin
reviewboard/reviews/apps.py
reviewboard/reviews/signal_handlers.py
reviewboard/reviews/tests/test_signal_handlers.py
Loading...