diff --git a/src/script/hydra_scheduler.pl b/src/script/hydra_scheduler.pl index d6e6d4d9..e54cf865 100755 --- a/src/script/hydra_scheduler.pl +++ b/src/script/hydra_scheduler.pl @@ -156,7 +156,7 @@ sub fetchInputAlt { # Pick the most recent successful build of the specified job. (my $prevBuild) = $db->resultset('Builds')->search( {finished => 1, project => $project->name, jobset => $jobset->name, job => $jobName, buildStatus => 0}, - {join => 'resultInfo', order_by => "id DESC", rows => 1}); + {join => 'resultInfo', order_by => "me.id DESC", rows => 1}); if (!defined $prevBuild || !isValidPath($prevBuild->outpath)) { print STDERR "no previous build available for `$jobName'";