Ensure that only time entries with tasks are selected (closes: #89c2a1)

Time entries without tasks shouldn't exist/be possible though.
This commit is contained in:
Paul van Tilburg 2016-09-11 15:02:40 +02:00
parent 7184248ccd
commit cb215e54eb

View file

@ -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