From 161c4da588d4cc757da44bcbb5875a84a7b8a7e6 Mon Sep 17 00:00:00 2001 From: Tobias McNulty Date: Mon, 8 Apr 2013 15:28:15 -0400 Subject: Fixed #14019 -- Initialize `SQLInsertCompiler.return_id` attribute. --- django/db/models/sql/compiler.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'django/db/models/sql') diff --git a/django/db/models/sql/compiler.py b/django/db/models/sql/compiler.py index 1f19131ba2..3444b74ac3 100644 --- a/django/db/models/sql/compiler.py +++ b/django/db/models/sql/compiler.py @@ -804,6 +804,11 @@ class SQLCompiler(object): class SQLInsertCompiler(SQLCompiler): + + def __init__(self, *args, **kwargs): + self.return_id = False + super(SQLInsertCompiler, self).__init__(*args, **kwargs) + def placeholder(self, field, val): if field is None: # A field value of None means the value is raw. -- cgit v1.3