-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not able to delete the user from wagtail admin #3442
Comments
…on (#3445) Possible Fix of #3442 On submission deletion, all other activities, determination, and other things are getting removed but as this `NEW SUBMISSION` event is not directly connected to submission so not getting removed. It is creating issues at the time of user deletion even after submission deletion. I was also thinking to show the model name, and object name in error itself but user deletion only seems to be dependent on `Activities` and `Events`(user can also be deleted only by removing Activities and events not submissions related to them), and even if we show staff the event or activities ids I don't think staff can easily delete those anyhow via UI. I think we need to decide a better way to delete a user, maybe issue #3441 help us?
@frjo @sandeepsajan0 Did #3445 fix this/can it be closed? Or is further action required? |
If I remember correctly this issue is due to some left over items in "actions_*". So the error message are correct and we need to find a way to delete these last items. |
@wes-otf It is kind of partially fixed. As Fredrik mentioned, the problem is the leftover actions for the submissions that already has been deleted. I think we can create a custom migration that can delete all the actions for non-existing submissions and then I think we will be ready to delete any user from the system. |
@sandeepsajan0 Excellent summary of the issue. I think the custom migration fix is a good way forward. |
@sandeepsajan0 yeah this was great, thanks for that background! I can take a stab at that custom migration. |
@frjo @sandeepsajan0 Are we only worried about deleting Applicants accounts? Digging through the changes made in #3445 it looks like only For example, I created a submission as an applicant, then on a different admin account deleted the submission. I then attempted to delete said admin account, and ran into Is this the intended functionality or should should these events also be deleted/have their |
@wes-otf Good work on investigating this! I think DELETE_SUBMISSION and ARCHIVE_SUBMISSION event should get the same fix as @sandeepsajan0 did for NEW_SUBMISSION. I can not see any bad things come from that, what do you think? |
@wes-otf Great investigation. We should have a fix for all these events as well but I think the deletion of applicant accounts is the priority because:
Right, We might want to anonymise the staff's data instead of deleting that as mentioned in #3441. |
Great, that PR should address these issues and I'll add a note onto #3441 explaining that further action could be required here. @sandeepsajan0 Thanks again for the in-depth breakdowns! That was super helpful. |
…3658) Closes #3442. This small migration addition compliments #3445 as it will remove any previous `NEW_SUBMISSION` events that belong to submissions that no longer exist. This will allow for the removal of applicants that don't have any active submission, but can't be deleted due to the `The object you are trying to delete is used somewhere...` error. Cheers!
…3658) Closes #3442. This small migration addition compliments #3445 as it will remove any previous `NEW_SUBMISSION` events that belong to submissions that no longer exist. This will allow for the removal of applicants that don't have any active submission, but can't be deleted due to the `The object you are trying to delete is used somewhere...` error. Cheers!
…3658) Closes #3442. This small migration addition compliments #3445 as it will remove any previous `NEW_SUBMISSION` events that belong to submissions that no longer exist. This will allow for the removal of applicants that don't have any active submission, but can't be deleted due to the `The object you are trying to delete is used somewhere...` error. Cheers!
Even after deleting all the related submissions and projects, the staff admin/staff is not able to delete the user.
It is showing the following error msg on deleting the user:

The text was updated successfully, but these errors were encountered: