ocadotechnology / codeforlife-portal

The portal code for Code for Life
https://www.codeforlife.education/
Other
51 stars 79 forks source link

Delete orphaned objects #2291

Closed lauracumming closed 6 months ago

lauracumming commented 7 months ago

Following issue #2279, we have some instances where a User object has been created, but the corresponding Teacher or Student object has not. Most of them are anonymised meaning this issue could partially be a remnant of old logic where a User could be of neither type.

We do however have some instances where the data was created recently.

Ensuring that the atomic transactions setting has been effectively turned on, we need to select all these "orphaned" User objects and simply delete them.

IMPORTANT: Make a note of how many Users this task deletes before actually deleting them.