From df98020beb5de10a6e34dc1a1e74d70ce631b44a Mon Sep 17 00:00:00 2001 From: Leo Q Date: Mon, 14 Aug 2023 21:06:48 +0800 Subject: [PATCH] avoid reference error --- sql/engines/oracle.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/engines/oracle.py b/sql/engines/oracle.py index 4efb7820a1..6f25bbe71b 100644 --- a/sql/engines/oracle.py +++ b/sql/engines/oracle.py @@ -28,8 +28,9 @@ class OracleEngine(EngineBase): def __init__(self, instance=None): super(OracleEngine, self).__init__(instance=instance) - self.service_name = instance.service_name - self.sid = instance.sid + if instance: + self.service_name = instance.service_name + self.sid = instance.sid def get_connection(self, db_name=None): if self.conn: