From 2372de54ac88c470f260c4dd2b100b7e6cc88f0e Mon Sep 17 00:00:00 2001 From: Luke Baker Date: Thu, 21 Oct 2010 14:56:46 -0400 Subject: [PATCH] add check for nil appearance in api test --- lib/tasks/test_api.rake | 1 + 1 file changed, 1 insertion(+), 0 deletions(-) diff --git a/lib/tasks/test_api.rake b/lib/tasks/test_api.rake index 8c53a7e..9864ea9 100644 --- a/lib/tasks/test_api.rake +++ b/lib/tasks/test_api.rake @@ -577,6 +577,7 @@ namespace :test_api do Vote.find_each(:batch_size => 1000, :include => :appearance) do |v| + next if v.nil? || v.appearance.nil? # Subtracting DateTime objects results in the difference in days server_response_time = v.created_at.to_f - v.appearance.created_at.to_f if server_response_time < 0 -- libgit2 0.21.2