From 55c30253b61fb3e1fbe6db4b2cb8a487ce908fe6 Mon Sep 17 00:00:00 2001
From: baizg1107 <preloyalwhite@163.com>
Date: Mon, 20 Jun 2022 11:52:47 +0800
Subject: [PATCH] fix none type judge

---
 lib/sqlalchemy/engine/base.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/sqlalchemy/engine/base.py b/lib/sqlalchemy/engine/base.py
index 0e695f6..fefc43b 100644
--- a/lib/sqlalchemy/engine/base.py
+++ b/lib/sqlalchemy/engine/base.py
@@ -152,8 +152,9 @@ class Connection(Connectable):
         account current schema translate map.
 
         """
-
-        name = obj.schema
+        name = None
+        if obj is not None:
+            name = obj.schema
         schema_translate_map = self._execution_options.get(
             "schema_translate_map", None
         )
-- 
2.27.0

