1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2025-05-09 14:46:01 +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:
2025-04-01 17:44:36 +03:00
parent ce0a2d9213
commit 41d831d29f

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)