From fc4fc43fee39eedf7f035b8c420897add3459412 Mon Sep 17 00:00:00 2001 From: lrbalt Date: Sun, 6 Apr 2008 15:27:33 +0000 Subject: [PATCH] fixes query for postgresql for bugreport on mailinglist git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@803 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/controllers/todos_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracks/app/controllers/todos_controller.rb b/tracks/app/controllers/todos_controller.rb index cada71bd..bffa0264 100644 --- a/tracks/app/controllers/todos_controller.rb +++ b/tracks/app/controllers/todos_controller.rb @@ -448,7 +448,7 @@ class TodosController < ApplicationController @down_count = Todo.count( :all, :conditions => ['todos.user_id = ? and todos.state = ? and contexts.hide = ? AND (projects.state = ? OR todos.project_id IS NULL)', current_user.id, 'active', false, 'active'], - :order => "todos.due IS NULL, todos.due ASC, todos.created_at ASC", + :group => "todos.id", :include => [ :project, :context ]) # #@down_count = Todo.count_by_sql(['SELECT COUNT(*) FROM todos, # contexts WHERE todos.context_id = contexts.id and todos.user_id = ?