From 56f8e4b79c0559e1df5bf262a8ad73fc471d234c Mon Sep 17 00:00:00 2001 From: Claude Paroz Date: Fri, 23 Nov 2012 17:20:36 +0100 Subject: [PATCH] [1.5.x] Fixed cursor commit command in PostGIS backend MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Thanks Bruno ReniƩ for noticing the error. Backport of 7b9a1fb96 from master. --- django/contrib/gis/db/backends/postgis/creation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/gis/db/backends/postgis/creation.py b/django/contrib/gis/db/backends/postgis/creation.py index 4447b64db80..43ae9a0331f 100644 --- a/django/contrib/gis/db/backends/postgis/creation.py +++ b/django/contrib/gis/db/backends/postgis/creation.py @@ -91,6 +91,6 @@ class PostGISCreation(DatabaseCreation): self.connection.settings_dict["NAME"] = test_database_name cursor = self.connection.cursor() cursor.execute("CREATE EXTENSION postgis") - cursor.commit() + cursor.connection.commit() return test_database_name