Perform extra cleanup when review request drafts get discarded.
Review Request #13135 — Created July 13, 2023 and submitted
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.
Summary | ID |
---|---|
4a5fcc0116eeb6e08bf58e6d5d701ae7f1aafb66 |
Description | From | Last Updated |
---|---|---|
I left a similar comment on /r/13142/, but I think we should do the deletion in the model, to keep … |
chipx86 | |
These should just be parens for a tuple. A set has a bit more overhead that won't result in anything … |
chipx86 | |
continuation line over-indented for hanging indent Column: 14 Error code: E126 |
reviewbot |
- Change Summary:
-
- Moved to RB6.
- Commits:
-
Summary ID 2c2b5bb312eecbe3ae98360fc9c5453d3257f7cf bb500f8661b1a606eb78cab1a1b588886ee21747 - Branch:
-
release-5.0.xrelease-6.x
Checks run (2 succeeded)
-
-
I left a similar comment on /r/13142/, but I think we should do the deletion in the model, to keep the logic in one place. Signals are more useful if we're dealing with code we don't control or performing operations unrelated to the purpose of that model. In this case,
ReviewRequestDraft
manages its file attachments, and as such should also manage its deletion.
- Commits:
-
Summary ID bb500f8661b1a606eb78cab1a1b588886ee21747 5607773b186cb9b1d0ab59f2c9d434059b5d5e99
- Commits:
-
Summary ID 5607773b186cb9b1d0ab59f2c9d434059b5d5e99 929b982c6c32b5d2fe79c6b9680296fb8d722978