Skip to content

Commit 89f29e6

Browse files
committed
fixed incorrect total size for namespaces info
1 parent 6fa73b9 commit 89f29e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pepdbagent/modules/namespace.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ def info(
207207

208208
with Session(self._sa_engine) as session:
209209
results = session.scalars(statement.limit(page_size).offset(page_size * page))
210+
total_number_of_namespaces = session.execute(select(func.count(User.id))).one()[0]
210211

211212
list_of_results = []
212213
for result in results:
@@ -222,7 +223,7 @@ def info(
222223
pagination=PaginationResult(
223224
page=page,
224225
page_size=page_size,
225-
total=len(list_of_results),
226+
total=total_number_of_namespaces,
226227
),
227228
results=list_of_results,
228229
)

pepdbagent/modules/schema.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ def add_version(
230230

231231
schema_obj.last_update_date = func.now()
232232

233-
234233
schema_version_obj = SchemaVersions(
235234
schema_id=schema_obj.id,
236235
version=version,

0 commit comments

Comments
 (0)