Skip to content

Commit

Permalink
skip invalid record data migration on VoteOnIssue
Browse files Browse the repository at this point in the history
  • Loading branch information
nishidayuya committed Nov 5, 2024
1 parent a358fa4 commit 075903d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/tasks/redmine_hearts.rake
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ namespace :redmine_hearts do

num_of_heart_before_processing = Heart.count

VoteOnIssue.where('vote_val > 0').each do |vote|
VoteOnIssue.where('vote_val > 0').where.not(issue: nil, user: nil).each do |vote|
issue = vote.issue
user = vote.user
datetime = vote.created_at || Time.now
Expand Down

0 comments on commit 075903d

Please sign in to comment.