Skip to content
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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from
Prev Previous commit
Next Next commit
Vote#check_valid should not prevent deletion of orphaned votes
  • Loading branch information
Oaphi committed Dec 16, 2024
commit c7499fadf9de007e558c9b53764dc1ff0d115784
2 changes: 1 addition & 1 deletion app/models/vote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def post_not_deleted
end

def check_valid
throw :abort unless valid?
throw :abort unless valid? || post.blank?
end

def add_counter
Expand Down