Commit 09abe4f6 authored by Matthew Laird's avatar Matthew Laird
Browse files

Jira ENSCORESW-1381

- Ensire the "version" if tested for is digits only
parent 61093b6e
......@@ -3171,7 +3171,8 @@ sub _core_get_species_and_object_type {
if(@results) {
return @results;
} elsif(my $vindex = rindex($stable_id, '.')) {
return $self->_core_get_species_and_object_type_worker(substr($stable_id,0,$vindex), $known_type, $dba);
return $self->_core_get_species_and_object_type_worker(substr($stable_id,0,$vindex), $known_type, $dba)
if(substr($stable_id,$vindex+1) =~ /^\d+$/);
}
return;
......@@ -3213,7 +3214,8 @@ sub _compara_get_species_and_object_type {
if(@results) {
return @results;
} elsif(my $vindex = rindex($stable_id, '.')) {
return $self->_compara_get_species_and_object_type_worker(substr($stable_id,0,$vindex), $known_type, $dba);
return $self->_compara_get_species_and_object_type_worker(substr($stable_id,0,$vindex), $known_type, $dba)
if(substr($stable_id,$vindex+1) =~ /^\d+$/);
}
return;
......
......@@ -946,7 +946,7 @@ SKIP: {
is( $species, 'homo_sapiens', 'Test the get_species_and_object_type method from the Registry with version, species');
is( $object_type, 'Gene', 'Test the get_species_and_object_type method from the Registry with version, object_type');
( $species, $object_type, $db_type ) = $registry->get_species_and_object_type('ENSG00000355555.2');
( $species, $object_type, $db_type ) = $registry->get_species_and_object_type('ENSG00000355555.2a');
ok( !defined($species), 'Test the get_species_and_object_type method from the Registry with wrong version, species');
}
......
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