Fix tests

This commit is contained in:
Beto Dealmeida
2025-11-25 11:48:46 -05:00
parent 046aabee73
commit 9c7fcbf548
5 changed files with 23 additions and 11 deletions

View File

@@ -1678,7 +1678,7 @@ def get_metric_type_from_column(
from superset.connectors.sqla.models import SqlMetric
# Explorable datasources may not have metrics attribute
if not hasattr(datasource, "metrics"):
if datasource is None or not hasattr(datasource, "metrics"):
return ""
metric: SqlMetric = next(