-
-
Notifications
You must be signed in to change notification settings - Fork 67
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
Fix server error on user profile vote summary tab if there are orphaned votes #1491
base: develop
Are you sure you want to change the base?
Conversation
LGTM based on inspection (one paranoid request). I appreciate the extra resilience in the view and controller. Someone with more knowledge of the scripts/daily jobs should also review this. How do we test it? Can we inject some bad data on the dev server and test there before going to production? |
There are several ways of doing so. A simple prerequisite is voting on something, then intentionally breaking the database integrity by updating the record in the After that's done, it's just a matter of executing the job. The simplest approach is to change the associated script file to call |
Closes #1488
This PR fixes the issue with orphan votes (with
post_id
but no actual post) by:CleanupVotes
daily job that removes orphaned votes (those that do not correspond to any post but still have apost_id
assigned to them);post
not being present;