Commit 8ed4353f authored by Eugene Kulesha's avatar Eugene Kulesha
Browse files

take care of the situations when source type presented by a variable rather than a array

parent d9ebe027
......@@ -2707,9 +2707,14 @@ sub get_all_DAS_Features{
foreach my $dasfact( @{$self->get_all_DASFactories} ){
my $dsn = $dasfact->adaptor->dsn;
my $name = $dasfact->adaptor->name;
my $type = $dasfact->adaptor->type;
# my $type = $dasfact->adaptor->type;
my $url = $dasfact->adaptor->url;
my ($type) = $dasfact->adaptor->mapping;
if (ref $type eq 'ARRAY') {
$type = shift @$type;
}
$type ||= $dasfact->adaptor->type;
# Construct a cache key : SOURCE_URL/TYPE
# Need the type to handle sources that serve multiple types of features
......
......@@ -195,12 +195,13 @@ sub get_all_DAS_Features{
foreach my $dasfact( @{$self->get_all_DASFactories} ){
my $dsn = $dasfact->adaptor->dsn;
my $name = $dasfact->adaptor->name;
my $type = $dasfact->adaptor->type;
my $url = $dasfact->adaptor->url;
# Construct a cache key : SOURCE_URL/TYPE
# Need the type to handle sources that serve multiple types of features
my ($type) = @{$dasfact->adaptor->mapping || []};
$type ||=$dasfact->adaptor->type;
my $key = join('/', $name, $type);
if( $self->{_das_features}->{$key} ){ # Use cached
......
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