From c36752e24b76e6bfa64efe3280d505ff0cab2e2a Mon Sep 17 00:00:00 2001 From: franck cuny Date: Sun, 3 Oct 2010 15:03:42 +0200 Subject: order fetch of last commits --- lib/jitterbug.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/jitterbug.pm b/lib/jitterbug.pm index d1de03f..33e84a4 100644 --- a/lib/jitterbug.pm +++ b/lib/jitterbug.pm @@ -27,7 +27,7 @@ get '/' => sub { my $last_commit = schema->resultset('Commit') - ->search( { projectid => $project->projectid }, {} )->single(); + ->search( { projectid => $project->projectid }, {order_by => {-desc => 'timestamp'}} )->first(); if ($last_commit) { # XXX see what data to store here -- cgit 1.4.1