Skip to content

Commit

Permalink
DH-4630 Fix empty list of tables
Browse files Browse the repository at this point in the history
jcjc712 committed Sep 11, 2023
1 parent 4c7fdb7 commit 0d42e44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dataherald/db_scanner/sqlalchemy.py
Original file line number Diff line number Diff line change
@@ -150,7 +150,11 @@ def scan(
MetaData.reflect(meta)
tables = inspector.get_table_names()
if table_name:
tables = [table for table in tables if table.lower() == table_name.lower()]
tables = [
table
for table in tables
if table and table.lower() == table_name.lower()
]
if len(tables) == 0:
raise ValueError("No table found")
result = []

0 comments on commit 0d42e44

Please sign in to comment.