Delete draft DiffSets when discarding unpublished review requests.

Review Request #13786 — Created April 24, 2024 and submitted — Latest diff uploaded

Information

Review Board
release-7.x

Reviewers

It turns out that we had a bug where deleting an unpublished review
request would leave the DiffSet attached to the draft in the database,
but unreachable. These are now less unreachable, since FileAttachment
can link to the DiffSet. This was causing some crashes in the API
attempting to serialize a DiffSet that had neither a history nor a
draft.

This change makes it so we delete the DiffSet before deleting the draft.

Ran unit tests. The newly-added test failed before the change and
succeeds after.

Commits

Files

    Loading...