From 903ca3b246f40996bf1c14776dd1c80d1782e529 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Mon, 12 Oct 2009 17:07:36 +0000 Subject: [PATCH] * Make download-by-type more deterministic when there are multiple files of the same type. --- src/lib/Hydra/Controller/Build.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/Hydra/Controller/Build.pm b/src/lib/Hydra/Controller/Build.pm index 2ce5e845..d62a4634 100644 --- a/src/lib/Hydra/Controller/Build.pm +++ b/src/lib/Hydra/Controller/Build.pm @@ -156,7 +156,7 @@ sub download_by_type : Chained('build') PathPart('download-by-type') { unless defined $type && defined $subtype; (my $product) = $c->stash->{build}->buildproducts->search( - {type => $type, subtype => $subtype}); + {type => $type, subtype => $subtype}, {order_by => "productnr"}); notFound($c, "Build doesn't have a build product with type $type/$subtype.") if !defined $product;