mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 17:26:55 +08:00
fix: table numbers
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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)}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user