Skip to content

Commit c8a272a

Browse files
committed
refactor: The data table supports enabling and disabling
1 parent b25470a commit c8a272a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backend/apps/datasource/crud/datasource.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,9 @@ def updateNum(session: SessionDep, ds: CoreDatasource):
400400

401401
def get_table_obj_by_ds(session: SessionDep, current_user: CurrentUser, ds: CoreDatasource) -> List[TableAndFields]:
402402
_list: List = []
403-
tables = session.query(CoreTable).filter(CoreTable.ds_id == ds.id).all()
403+
tables = session.query(CoreTable).filter(
404+
and_(CoreTable.ds_id == ds.id, CoreTable.checked == True)
405+
).all()
404406
conf = DatasourceConf(**json.loads(aes_decrypt(ds.configuration))) if ds.type != "excel" else get_engine_config()
405407
schema = conf.dbSchema if conf.dbSchema is not None and conf.dbSchema != "" else conf.database
406408

0 commit comments

Comments
 (0)