You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2022/08/26 20:46:08 UTC

[superset] 01/01: update exception

This is an automated email from the ASF dual-hosted git repository.

hugh pushed a commit to branch update-exc
in repository https://gitbox.apache.org/repos/asf/superset.git

commit b21b3e795f0367284d667f535aa065859f3fb21d
Author: hughhhh <hu...@gmail.com>
AuthorDate: Fri Aug 26 13:45:45 2022 -0700

    update exception
---
 superset/explore/commands/get.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/superset/explore/commands/get.py b/superset/explore/commands/get.py
index 1b9ec433da..3a656ea2b9 100644
--- a/superset/explore/commands/get.py
+++ b/superset/explore/commands/get.py
@@ -27,7 +27,7 @@ from superset import db, security_manager
 from superset.commands.base import BaseCommand
 from superset.connectors.base.models import BaseDatasource
 from superset.connectors.sqla.models import SqlaTable
-from superset.datasets.commands.exceptions import DatasetNotFoundError
+from superset.dao.exceptions import DatasourceNotFound
 from superset.datasource.dao import DatasourceDAO
 from superset.exceptions import SupersetException
 from superset.explore.commands.parameters import CommandParameters
@@ -114,7 +114,7 @@ class GetExploreCommand(BaseCommand, ABC):
                 dataset = DatasourceDAO.get_datasource(
                     db.session, cast(str, self._dataset_type), self._dataset_id
                 )
-            except DatasetNotFoundError:
+            except DatasourceNotFound:
                 pass
         dataset_name = dataset.name if dataset else _("[Missing Dataset]")