Commit eeba8489 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Do not throw on no adaptor in get_all_alternative_translations().

parent 5d3c1b93
......@@ -625,10 +625,9 @@ sub translation {
sub get_all_alternative_translations {
my ($self) = @_;
if ( !exists( $self->{'alternative_translations'} ) ) {
if ( !defined( $self->adaptor() ) ) {
throw("No adaptor attached");
}
if ( !exists( $self->{'alternative_translations'} )
&& defined( $self->adaptor() ) )
{
my $pa = $self->adaptor()->db()->get_TranslationAdaptor();
my @translations = @{ $pa->fetch_all_by_Transcript($self) };
......
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