Create an account you don't mind deleting. This will be the gift recipient.
Log in to a different account.
Post > New Work
Fill in required information and enter the user from step 1 as a gift recipient.
Post the work.
Log in as the user from step 1.
Hi, username! > My Dashboard > Gifts
Refuse the gift you received.
Delete your account.
Log back in as the creator of the gift work.
Edit the work.
What should happen
You should be able to save the changes.
What actually happens
When you attempt to save the edits, you get a 500 error. This is because the Gift object still exists. (As a result, if you log in as an admin and view the work, you'll see "Refused As Gift:" displayed in the work meta, but it will be blank.)
Because the Gift is basically useless, we should make sure it gets deleted when the recipient deletes their account.
Editing works fine if:
the gift is accepted instead of refused
the pseud is deleted instead of the user