From 0d42e441cffc5b313bed96e1e364159ca95dab0f Mon Sep 17 00:00:00 2001 From: Juan Carlos Jose Camacho Date: Mon, 11 Sep 2023 13:36:55 -0600 Subject: [PATCH] DH-4630 Fix empty list of tables --- dataherald/db_scanner/sqlalchemy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dataherald/db_scanner/sqlalchemy.py b/dataherald/db_scanner/sqlalchemy.py index fa55511f..b4f1835f 100644 --- a/dataherald/db_scanner/sqlalchemy.py +++ b/dataherald/db_scanner/sqlalchemy.py @@ -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 = []