mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
[1.1.X] Fixed #9437 -- Now close the connection after getting the PostGIS version during spatial backend initialization.
Backport of r12948 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12949 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b2ecfe845f
commit
bf5d71f2a7
@ -12,7 +12,8 @@ def _get_postgis_func(func):
|
||||
cursor = connection.cursor()
|
||||
cursor.execute('SELECT %s()' % func)
|
||||
row = cursor.fetchone()
|
||||
cursor.close()
|
||||
# Close out the connection. See #9437.
|
||||
connection.close()
|
||||
return row[0]
|
||||
|
||||
### PostGIS management functions ###
|
||||
|
Loading…
x
Reference in New Issue
Block a user