Commit aa224e93 authored by Leo Gordon's avatar Leo Gordon
Browse files

bugfix: fetch_by_dbID should work now (thanks to ChuangKee and Miguel)

parent 469f582e
......@@ -215,7 +215,7 @@ sub primary_key_constraint {
sub fetch_by_dbID {
my $self = shift @_; # the rest in @_ should be primary_key column values
return $self->fetch_all( $self->primary_key_constraint( @_ ), 1 );
return $self->fetch_all( $self->primary_key_constraint( \@_ ), 1 );
}
......
......@@ -256,7 +256,8 @@ sub analysis {
$self->{'_analysis'} = shift @_;
} elsif(! $self->{'_analysis'} ) {
if(my $analysis_id = $self->analysis_id()) {
$self->{'_analysis'} = $self->adaptor->db->get_AnalysisAdaptor->fetch_by_dbID( $analysis_id );
$self->{'_analysis'} = $self->adaptor->db->get_AnalysisAdaptor->fetch_by_dbID( $analysis_id )
or die "Could not fetch analysis for analysis_id=$analysis_id";
} else {
die "analysis_id not defined, could not fetch Hive::Analysis object";
}
......
Markdown is supported
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