Skip to content

Commit ee9e91c

Browse files
committed
Add the correct South introspection rules.
1 parent d587347 commit ee9e91c

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

json_field/fields.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,15 @@ def set_json(model_instance, value):
142142
try:
143143
# add support for South migrations
144144
from south.modelsinspector import add_introspection_rules
145-
add_introspection_rules([], ['^json_field\.fields\.JSONField'])
145+
rules = [
146+
(
147+
(JSONField,),
148+
[],
149+
{
150+
'db_type': ['_db_type', {'default': None}]
151+
}
152+
)
153+
]
154+
add_introspection_rules(rules, ['^json_field\.fields\.JSONField'])
146155
except ImportError:
147156
pass

0 commit comments

Comments
 (0)