diff --git a/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm index 8bb1b278876d01a584d41689de825409ccc33b5a..528e0b86cce0550558e1c81c84b7736690698b1a 100644 --- a/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/TranslationAdaptor.pm @@ -659,12 +659,12 @@ sub fetch_by_dbID { if ( defined($transcript) ) { my $translation = $self->fetch_by_Transcript($transcript); - if ( defined($translation) ) { + if ( defined($translation) && $translation->dbID()==$dbID ) { return $translation; } my @alt_translations = - @{ $self->fetch_all_by_Transcript($transcript) }; + @{ $self->fetch_all_alternative_by_Transcript($transcript) }; foreach my $alt_translation (@alt_translations) { if ( $alt_translation->dbID() == $dbID ) {