Skip to content

Conversation

@wilco375
Copy link
Contributor

Summary

Fixes #428

User archival failed because a form can only have one response per user, but if multiple responses are archived they all get user id 0, which caused this validation to fail. The validation now explicitly excludes the archived user (id 0).
I also changed the user update statement to throw an error once an update fails. This makes it more clear where the error occurs. Regardless of this, user archival will fail anyways if the update fails because of foreign key constraints once the user is attempted to be deleted (as has been happening until now).

@wilco375 wilco375 added this pull request to the merge queue Oct 11, 2024
Merged via the queue into staging with commit 239a947 Oct 11, 2024
@wilco375 wilco375 deleted the bugfix/user-archival branch October 11, 2024 20:33
@sentry
Copy link

sentry bot commented Oct 12, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ ActiveRecord::RecordInvalid: Failed to update Form::Response record (ID: 49) Sidekiq/UserCleanupJob View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

User_cleanup_Job doesn't run properly

3 participants