mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2025-05-08 22:26:04 +02:00
Adjust psycopg connection for dict_row factory
This commit is contained in:
@ -81,7 +81,7 @@ class AllStatisticsResource:
|
||||
with db.cursor() as cursor:
|
||||
# get total number of communities/collections/items so we can estimate the pages
|
||||
cursor.execute(f"SELECT COUNT(id) FROM {req.context.statistics_scope}")
|
||||
pages = math.ceil(cursor.fetchone()[0] / limit)
|
||||
pages = math.ceil(cursor.fetchone()['count'] / limit)
|
||||
|
||||
# get statistics and use limit and offset to page through results
|
||||
cursor.execute(
|
||||
|
Reference in New Issue
Block a user