Skip to content
Snippets Groups Projects
Commit b47a2081 authored by Leo Gordon's avatar Leo Gordon
Browse files

bugfix : if the given job_id does not match any Job, exit gracefully

parent 9fed9da5
No related branches found
No related tags found
No related merge requests found
......@@ -246,8 +246,14 @@ sub main {
$self->{'analyses_pattern'} = $self->{'logic_name'};
}
my $list_of_analyses = $run_job_id
? [ $self->{'dba'}->get_AnalysisJobAdaptor->fetch_by_dbID( $run_job_id )->analysis ]
my $run_job;
if($run_job_id) {
$run_job = $self->{'dba'}->get_AnalysisJobAdaptor->fetch_by_dbID( $run_job_id )
or die "Could not fetch Job with dbID=$run_job_id.\n";
}
my $list_of_analyses = $run_job
? [ $run_job->analysis ]
: $self->{'dba'}->get_AnalysisAdaptor->fetch_all_by_pattern( $self->{'analyses_pattern'} );
if( $self->{'analyses_pattern'} ) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment