Code

Ticket #9437: gis-connection-close-1.1.X.diff

File gis-connection-close-1.1.X.diff, 542 bytes (added by jbronn, 4 years ago)
Line 
1Index: django/contrib/gis/db/backend/postgis/management.py
2===================================================================
3--- django/contrib/gis/db/backend/postgis/management.py (revision 12927)
4+++ django/contrib/gis/db/backend/postgis/management.py (working copy)
5@@ -12,7 +12,8 @@
6     cursor = connection.cursor()
7     cursor.execute('SELECT %s()' % func)
8     row = cursor.fetchone()
9-    cursor.close()
10+    # Close out the connection.  See #9437.
11+    connection.close()
12     return row[0]
13 
14 ### PostGIS management functions ###