berinhard / model_mommy

No longer maintained, please migrate to model_bakery
http://model-bakery.readthedocs.org/
Other
903 stars 141 forks source link

Warnings when running tox: BooleanField does not have a default value #222

Closed romulocollopy closed 9 years ago

romulocollopy commented 9 years ago

I've added a default value False on test.generic.models.Person.bipolar because https://docs.djangoproject.com/fr/1.8/releases/1.6/#booleanfield-no-longer-defaults-to-false. It seens to solve the problem.

As soom as someone take a look in my commit I'll make a PR.

vandersonmota commented 9 years ago

@romulocollopy i've ignored the default field so that the generator would be used in make/prepare (code coverage). Otherwise mommy would just pick the default value. But fear not, we'll always return a true/false: https://github.com/vandersonmota/model_mommy/blob/master/model_mommy/generators.py#L119