Do not set transaction as readonly with psycopg2cffi
issue9546 review294341002
This commit is contained in:
1 parent
db6cc1324d
commit
261c7b0a52
1 file changed
+1
-1
@@ -231,7 +231,7 @@ class Database(DatabaseInterface):
|
||||
# psycopg2cffi does not have the readonly property
|
||||
if hasattr(conn, 'readonly'):
|
||||
conn.readonly = readonly
|
||||
elif not autocommit:
|
||||
elif not autocommit and readonly:
|
||||
cursor = conn.cursor()
|
||||
cursor.execute('SET TRANSACTION READ ONLY')
|
||||
return conn
|
||||
|
||||
Reference in new issue
Block a user