From cb215e54ebd1f87aa16632603c31a8e29960e470 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sun, 11 Sep 2016 15:02:40 +0200 Subject: [PATCH] Ensure that only time entries with tasks are selected (closes: #89c2a1) Time entries without tasks shouldn't exist/be possible though. --- stoptime.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/stoptime.rb b/stoptime.rb index d44edb7..9e85636 100644 --- a/stoptime.rb +++ b/stoptime.rb @@ -1520,6 +1520,7 @@ module StopTime::Controllers .where("stoptime_tasks.invoice_id" => nil)\ .order("start DESC") end + @time_entries = @time_entries.where.not(task_id: nil) @time_entries.each do |te| @input["bill_#{te.id}"] = true if te.bill? end