@@ -110,7 +110,8 @@ async def get_data_list(table_id: int,page: int = Query(1, gt=0, description='
totalsql = f'select count(*) from ({sql})t'
total = db.execute(text(totalsql)).fetchone()[0]
-
+ if total==0:
+ total=1
pages, pagesmod = divmod(total, pageSize)
print(total, pages, pagesmod)
if pagesmod != 0: