Commit e6c90946 by Florian Apolloner

Don't set through in Django < 1.7 (validation doesn't allow it).

parent 58d73e36
......@@ -35,7 +35,7 @@ class TaggableRel(ManyToManyRel):
self.limit_choices_to = {}
self.symmetrical = True
self.multiple = True
self.through = through
self.through = None if VERSION < (1, 7) else through
self.field = field
def get_joining_columns(self):
......@@ -93,7 +93,7 @@ class TaggableManager(RelatedField, Field):
def deconstruct(self):
name, path, args, kwargs = super(TaggableManager, self).deconstruct()
for kwarg in ['serialize', 'null']:
for kwarg in ('serialize', 'null'):
del kwargs[kwarg]
return name, path, args, kwargs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment