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:
parent
ce0a2d9213
commit
41d831d29f
@ -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 Python’s uuid.UUID type to PostgreSQL’s uuid
|
||||
# See: https://www.psycopg.org/docs/extras.html
|
||||
psycopg2.extras.register_uuid()
|
||||
|
||||
with DatabaseManager() as db:
|
||||
db.set_read_only(True)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user