diff --git a/backend/apps/datasource/api/datasource.py b/backend/apps/datasource/api/datasource.py index 6e2761f5..2c3d36e8 100644 --- a/backend/apps/datasource/api/datasource.py +++ b/backend/apps/datasource/api/datasource.py @@ -64,7 +64,7 @@ async def get_tables_by_conf(session: SessionDep, ds: CoreDatasource): @router.post("/getFields/{id}/{table_name}") -async def get_tables(session: SessionDep, id: int, table_name: str): +async def get_fields(session: SessionDep, id: int, table_name: str): return getFields(session, id, table_name) diff --git a/backend/apps/datasource/crud/datasource.py b/backend/apps/datasource/crud/datasource.py index f2a31b82..5647f7c8 100644 --- a/backend/apps/datasource/crud/datasource.py +++ b/backend/apps/datasource/crud/datasource.py @@ -263,7 +263,7 @@ def fieldEnum(session: SessionDep, id: int): def updateNum(session: SessionDep, ds: CoreDatasource): - all_tables = get_tables(ds) + all_tables = get_tables(ds) if ds.type != 'excel' else json.loads(aes_decrypt(ds.configuration)).get('sheets') selected_tables = get_tables_by_ds_id(session, ds.id) num = f'{len(selected_tables)}/{len(all_tables)}'