diff options
| author | Magnus Hagander | 2020-04-17 18:00:42 +0000 |
|---|---|---|
| committer | Magnus Hagander | 2020-04-17 18:00:42 +0000 |
| commit | 62fc8c726b8cc9670ba88e892ed8169bb8b9dd6d (patch) | |
| tree | b7607fabf5d793e9aa0174b3b806cfe80b788361 /postgresqleu/util/db.py | |
| parent | 75bd04e991b1c5c5c18acd6c77f0facc2b740279 (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.py | 2 |
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, }) |
