From 3f1efc44f65604a3e6bc09aba3dbfb649d3e966e Mon Sep 17 00:00:00 2001 From: Aymeric Augustin Date: Mon, 11 Mar 2013 15:43:42 +0100 Subject: [PATCH] Fixed loaddata command, broken in the previous merge. --- django/core/management/commands/loaddata.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/core/management/commands/loaddata.py b/django/core/management/commands/loaddata.py index 8aa40cf021..c95d11cf60 100644 --- a/django/core/management/commands/loaddata.py +++ b/django/core/management/commands/loaddata.py @@ -116,8 +116,10 @@ class Command(BaseCommand): if sequence_sql: if self.verbosity >= 2: self.stdout.write("Resetting sequences\n") + cursor = connection.cursor() for line in sequence_sql: cursor.execute(line) + cursor.close() if self.verbosity >= 1: if self.fixture_object_count == self.loaded_object_count: