Commit 7c480be5a9125cbf5d3feaa2a8993b10fec2f61f
1 parent
03752ae4
Exists in
master
and in
1 other branch
reload question to get most recent data
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
lib/tasks/test_api.rake
| @@ -405,6 +405,8 @@ namespace :test_api do | @@ -405,6 +405,8 @@ namespace :test_api do | ||
| 405 | # want to ignore some tests for any question with votes before 2010-02-17 | 405 | # want to ignore some tests for any question with votes before 2010-02-17 |
| 406 | question_has_votes_before_2010_02_17 = question.votes.count(:conditions => ["created_at < ?", '2010-02-17']) > 0 | 406 | question_has_votes_before_2010_02_17 = question.votes.count(:conditions => ["created_at < ?", '2010-02-17']) > 0 |
| 407 | 407 | ||
| 408 | + # reload question to make sure we have most recent data | ||
| 409 | + question.reload | ||
| 408 | question.choices.each do |choice| | 410 | question.choices.each do |choice| |
| 409 | 411 | ||
| 410 | if choice.wins | 412 | if choice.wins |