summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAndriy Sokolovskiy <sokandpal@yandex.ru>2014-12-15 16:14:39 +0200
committerTim Graham <timograham@gmail.com>2014-12-15 13:40:24 -0500
commit089047331d972c0ee58d13476fc54f2118bf1359 (patch)
treed5f65940e68cd277ca39762e3883d6d7e8c1ee09 /django
parent222699d224ee7851e1cab5ecc029cf83836b882b (diff)
Fixed #23987 -- Made SQLite SchemaEditor always use effective_default().
Diffstat (limited to 'django')
-rw-r--r--django/db/backends/sqlite3/schema.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/db/backends/sqlite3/schema.py b/django/db/backends/sqlite3/schema.py
index 0ac2f25e04..9aeca56bf7 100644
--- a/django/db/backends/sqlite3/schema.py
+++ b/django/db/backends/sqlite3/schema.py
@@ -69,8 +69,8 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
# Add in any created fields
for field in create_fields:
body[field.name] = field
- # If there's a default, insert it into the copy map
- if field.has_default():
+ # Choose a default and insert it into the copy map
+ if not isinstance(field, ManyToManyField):
mapping[field.column] = self.quote_value(
self.effective_default(field)
)