We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ff3a96 commit b27784aCopy full SHA for b27784a
app/server.py
@@ -4,6 +4,7 @@
4
import traceback
5
import os
6
import psycopg
7
+from psycopg.rows import dict_row
8
9
from dotenv import load_dotenv
10
@@ -37,7 +38,7 @@ def get_visits():
37
38
FROM visits
39
WHERE visits.datetime BETWEEN (%s) AND (%s);'''
40
conn = get_db()
- with conn.cursor() as c:
41
+ with conn.cursor(row_factory=dict_row) as c:
42
c.execute(query, [begin_date, end_date])
43
res = c.fetchall()
44
return res
@@ -57,7 +58,7 @@ def get_registrations():
57
58
FROM registrations
59
WHERE registrations.datetime BETWEEN (%s) AND (%s);'''
60
61
62
63
64
0 commit comments