Fix "model '%s' must have a %s choices class attribute" error on migrations.

This commit is contained in:
Rodney Folz 2014-04-25 13:32:49 -07:00
parent db5e1f99fc
commit 85a9f8e6b1

View file

@ -70,6 +70,11 @@ class StatusField(models.CharField):
self._choices = [(0, 'dummy')]
super(StatusField, self).contribute_to_class(cls, name)
def deconstruct(self):
name, path, args, kwargs = super(StatusField, self).deconstruct()
kwargs['no_check_for_status'] = self.check_for_status
return name, path, args, kwargs
class MonitorField(models.DateTimeField):
"""