1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2025-04-14 02:29:23 +02:00

dspace_statistics_api/app.py: don't use psycopg2.extras.register_uuid()

In psycogp version 3 we can use native Python UUIDs without special
handling.
This commit is contained in:
Alan Orth 2025-04-01 17:44:36 +03:00
parent ce0a2d9213
commit 41d831d29f
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9

View File

@ -4,7 +4,6 @@ import json
import math
import falcon
import psycopg2.extras
from falcon_swagger_ui import register_swaggerui_app
from .config import DSPACE_STATISTICS_API_URL, VERSION
@ -185,10 +184,6 @@ class SingleStatisticsResource:
def on_get(self, req, resp, id_):
"""Handles GET requests"""
# Adapt Pythons uuid.UUID type to PostgreSQLs uuid
# See: https://www.psycopg.org/docs/extras.html
psycopg2.extras.register_uuid()
with DatabaseManager() as db:
db.set_read_only(True)