mirror of
https://github.com/Hopiu/django-model-utils.git
synced 2026-03-16 20:00:23 +00:00
Fix "model '%s' must have a %s choices class attribute" error on migrations.
This commit is contained in:
parent
db5e1f99fc
commit
85a9f8e6b1
1 changed files with 5 additions and 0 deletions
|
|
@ -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):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue