forked from lix-project/hydra
Remove unnecessary join against releases table
This gets rid of the warning: DBIx::Class::Storage::DBI::select_single(): Query returned more than one row. SQL that returns multiple rows is DEPRECATED for ->find and ->single at /home/eelco/Dev/hydra/src/script/../lib/Hydra/Controller/Project.pm line 15
This commit is contained in:
parent
6c6ce7a781
commit
67c79a16a8
|
@ -12,10 +12,7 @@ sub projectChain :Chained('/') :PathPart('project') :CaptureArgs(1) {
|
|||
my ($self, $c, $projectName) = @_;
|
||||
$c->stash->{params}->{name} //= $projectName;
|
||||
|
||||
$c->stash->{project} = $c->model('DB::Projects')->find($projectName, {
|
||||
join => [ 'releases' ],
|
||||
order_by => { -desc => "releases.timestamp" },
|
||||
});
|
||||
$c->stash->{project} = $c->model('DB::Projects')->find($projectName);
|
||||
|
||||
notFound($c, "Project ‘$projectName’ doesn't exist.")
|
||||
if !$c->stash->{project} && !($c->action->name eq "project" and $c->request->method eq "PUT");
|
||||
|
|
Loading…
Reference in a new issue