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

Do not weaken the reference to the transcript of a translation if the

transcript had to be fetched from the database.  If this happens, the
user is likely working in a translation-centric way, i.e. not going
through transcripts.  If the reference is weakened, the reference to
the transcript will be undef after the end of the code block, as the
transcript passes out of scope.
parent 2c1b8c2a
......@@ -180,7 +180,10 @@ sub transcript {
$adaptor->db()->get_TranscriptAdaptor()
->fetch_by_translation_id($dbID);
weaken( $self->{'transcript'} ); # Avoid circular references.
# Do not weaken the reference if we had to get the transcript from the
# database. The user is probably working on translations directly,
# not going through transcripts.
#weaken( $self->{'transcript'} ); # Avoid circular references.
}
return $self->{'transcript'};
......
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