From fc661ee37e619f4f7fd361e25e124934551b7a93 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20Kusalananda=20K=C3=A4h=C3=A4ri?=
 <ak4@sanger.ac.uk>
Date: Fri, 29 Jan 2010 13:38:43 +0000
Subject: [PATCH] Slight mod to previous bugfix:  Don't compare with $old_dbid
 if it's undefined.

---
 modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm
index a2eebb1b89..f675739ebf 100644
--- a/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm
+++ b/modules/Bio/EnsEMBL/DBSQL/TranscriptAdaptor.pm
@@ -831,7 +831,7 @@ sub store {
     my $old_dbid = $translation->dbID();
     $db->get_TranslationAdaptor()->store( $translation, $transc_dbID );
 
-    if ( $translation->dbID() != $old_dbid ) {
+    if ( defined($old_dbid) && $translation->dbID() != $old_dbid ) {
       # The dbID of the translation changed.  Need to update the
       # canonical_translation_id for this transcript.
 
-- 
GitLab