Skip to content

Commit b68427a

Browse files
committed
fix: table numbers
1 parent ce0ed8f commit b68427a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

backend/apps/datasource/api/datasource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ async def get_tables_by_conf(session: SessionDep, ds: CoreDatasource):
6464

6565

6666
@router.post("/getFields/{id}/{table_name}")
67-
async def get_tables(session: SessionDep, id: int, table_name: str):
67+
async def get_fields(session: SessionDep, id: int, table_name: str):
6868
return getFields(session, id, table_name)
6969

7070

backend/apps/datasource/crud/datasource.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def fieldEnum(session: SessionDep, id: int):
263263

264264

265265
def updateNum(session: SessionDep, ds: CoreDatasource):
266-
all_tables = get_tables(ds)
266+
all_tables = get_tables(ds) if ds.type != 'excel' else json.loads(aes_decrypt(ds.configuration)).get('sheets')
267267
selected_tables = get_tables_by_ds_id(session, ds.id)
268268
num = f'{len(selected_tables)}/{len(all_tables)}'
269269

0 commit comments

Comments
 (0)