svthalia / concrexit

Thalia Website built on Django.
https://thalia.nu
Other
22 stars 11 forks source link

Fix potentially incorrectly deleting old paid registrations/renewals #3736

Open DeD1rk opened 1 week ago

DeD1rk commented 1 week ago

While this should be impossible in practice already, this ensures that no registations/renewals are deleted outside of dataminimisation that were actually paid/completed.

This makes it more certain that invoices for paid registrations are not accidentally getting deleted.

This is related to CONCREXIT-1ER. There, old renewals were deleted by this task, and then their invoices were marked to be deleted from moneybird, even though they should not be.

The problem was that they should actually have been deleted by dataminimisation, which would not mark the invoices for deletion. This PR changes the task to not touch paid or rejected or completed registrations and renewals, because those should already be handled by dataminimisation.