summaryrefslogtreecommitdiff
path: root/postgresqleu/util/db.py
diff options
context:
space:
mode:
authorMagnus Hagander2020-04-17 18:00:42 +0000
committerMagnus Hagander2020-04-17 18:00:42 +0000
commit62fc8c726b8cc9670ba88e892ed8169bb8b9dd6d (patch)
treeb7607fabf5d793e9aa0174b3b806cfe80b788361 /postgresqleu/util/db.py
parent75bd04e991b1c5c5c18acd6c77f0facc2b740279 (diff)
Get native cursor in timezone context manager
While the internal use doesn't matter since it only does SET commands, we need a native cursor being returned so we can read timestamps out of it properly.
Diffstat (limited to 'postgresqleu/util/db.py')
-rw-r--r--postgresqleu/util/db.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/postgresqleu/util/db.py b/postgresqleu/util/db.py
index e0a07381..b9740892 100644
--- a/postgresqleu/util/db.py
+++ b/postgresqleu/util/db.py
@@ -101,7 +101,7 @@ class ensure_conference_timezone():
self.tzname = conference.tzname
def __enter__(self):
- c = connection.cursor()
+ c = get_native_cursor()
c.execute("SET TIMEZONE=%(tz)s", {
'tz': self.tzname,
})