From: Sumit Khanna Date: Mon, 4 Oct 2021 12:00:20 +0000 (+0530) Subject: providing schema to check has_table() succeeding NoSuchTableError in face of None... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7118%2Fhead;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git providing schema to check has_table() succeeding NoSuchTableError in face of None (default)schema --- diff --git a/lib/sqlalchemy/engine/reflection.py b/lib/sqlalchemy/engine/reflection.py index 4c6c6d9396..509ca178b0 100644 --- a/lib/sqlalchemy/engine/reflection.py +++ b/lib/sqlalchemy/engine/reflection.py @@ -781,7 +781,7 @@ class Inspector(object): cols_by_orig_name, ) - if not self.has_table(table.name): + if not self.has_table(table.name, schema): raise exc.NoSuchTableError(table.name) self._reflect_pk(