Code

Ticket #9437: models.py.diff

File models.py.diff, 622 bytes (added by mattxbart, 5 years ago)

gis contrib models.py add connection.close() in get_srid_info

Line 
1Index: django/contrib/gis/models.py
2===================================================================
3--- django/contrib/gis/models.py        (revision 9826)
4+++ django/contrib/gis/models.py        (working copy)
5@@ -266,6 +266,7 @@
6             raise ValueError('Failed to find spatial reference entry in "%s" corresponding to SRID=%s.' %
7                              (SpatialRefSys._meta.db_table, srid))
8         srs_wkt = fetched[0]
9+        connection.close()
10 
11         # Getting metadata associated with the spatial reference system identifier.
12         # Specifically, getting the unit information and spheroid information