mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
chore: switching out ConnectorRegistry references for DatasourceDAO (#20380)
* rename and move dao file * Update dao.py * add cachekey * Update __init__.py * change reference in query context test * add utils ref * more ref changes * add helpers * add todo in dashboard.py * add cachekey * circular import error in dar.py * push rest of refs * fix linting * fix more linting * update enum * remove references for connector registry * big reafctor * take value * fix * test to see if removing value works * delete connectregistry * address concerns * address comments * fix merge conflicts * address concern II * address concern II * fix test Co-authored-by: Phillip Kelley-Dotson <pkelleydotson@yahoo.com>
This commit is contained in:
@@ -39,7 +39,7 @@ from sqlalchemy.engine.base import Connection
|
||||
from sqlalchemy.orm import relationship
|
||||
from sqlalchemy.orm.mapper import Mapper
|
||||
|
||||
from superset import ConnectorRegistry, db, is_feature_enabled, security_manager
|
||||
from superset import db, is_feature_enabled, security_manager
|
||||
from superset.legacy import update_time_range
|
||||
from superset.models.helpers import AuditMixinNullable, ImportExportMixin
|
||||
from superset.models.tags import ChartUpdater
|
||||
@@ -126,7 +126,10 @@ class Slice( # pylint: disable=too-many-public-methods
|
||||
|
||||
@property
|
||||
def cls_model(self) -> Type["BaseDatasource"]:
|
||||
return ConnectorRegistry.sources[self.datasource_type]
|
||||
# pylint: disable=import-outside-toplevel
|
||||
from superset.datasource.dao import DatasourceDAO
|
||||
|
||||
return DatasourceDAO.sources[self.datasource_type]
|
||||
|
||||
@property
|
||||
def datasource(self) -> Optional["BaseDatasource"]:
|
||||
|
||||
Reference in New Issue
Block a user