bugfix
authorMarcel Hlopko <marcel.hlopko@gmail.com>
Wed, 26 Jun 2013 10:14:41 +0200
changeset 113 d8657a15fc71
parent 112 e8d75fe4e580
child 114 c42ae33ccc2f
bugfix
web/app/models/benchmark_configuration.rb
--- a/web/app/models/benchmark_configuration.rb	Wed Jun 26 10:04:57 2013 +0200
+++ b/web/app/models/benchmark_configuration.rb	Wed Jun 26 10:14:41 2013 +0200
@@ -35,8 +35,12 @@
 
   def results_at(time)
     batch = benchmark_batches.where(performed_at: time).first
-    all_benchmark_infos.map do |info|
-      batch.result_for(info)
+    if batch
+      all_benchmark_infos.map do |info|
+        batch.result_for(info)
+      end
+    else
+      []
     end
   end