summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAndrew Pinkham <code@andrewsforge.com>2014-09-05 17:07:42 -0700
committerTim Graham <timograham@gmail.com>2014-09-08 07:39:09 -0400
commit4680d25df23875bced0f17d361782bda80ce79d6 (patch)
tree02322d2f7649709652fd1f1685ff91c994ecbcba /django
parentf36ab2d3f220a001745c6b7cd1712dd8415aa31c (diff)
Fixed #22951 -- Checked for types during deep_deconstruct migration serialization process.
Thanks Sam Hartsfield for the report.
Diffstat (limited to 'django')
-rw-r--r--django/db/migrations/autodetector.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/migrations/autodetector.py b/django/db/migrations/autodetector.py
index 41884058b7..076eb7c778 100644
--- a/django/db/migrations/autodetector.py
+++ b/django/db/migrations/autodetector.py
@@ -49,7 +49,7 @@ class MigrationAutodetector(object):
Used for full comparison for rename/alter; sometimes a single-level
deconstruction will not compare correctly.
"""
- if not hasattr(obj, 'deconstruct'):
+ if not hasattr(obj, 'deconstruct') or isinstance(obj, type):
return obj
deconstructed = obj.deconstruct()
if isinstance(obj, models.Field):