You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.
Currently when using _fill_optional=True, Model Mommy will randomly choose between (None, False, True) for a NullBooleanField.
This feature was added in #305, but I think if _fill_optional=True is specified, it should treat a NullBooleanField the same as a BooleanField(null=True, blank=True) as Django recommends using NullBooleanField where there is a use case for the empty state in a boolean field.
Model Mommy treats None here as a valid non-empty value even though it still means that the field is empty. This confuses any tests that assume that _fill_optional=True will guarantee no None values.
The text was updated successfully, but these errors were encountered:
Currently when using
_fill_optional=True
, Model Mommy will randomly choose between(None, False, True)
for aNullBooleanField
.This feature was added in #305, but I think if
_fill_optional=True
is specified, it should treat aNullBooleanField
the same as aBooleanField(null=True, blank=True)
as Django recommends usingNullBooleanField
where there is a use case for the empty state in a boolean field.Model Mommy treats
None
here as a valid non-empty value even though it still means that the field is empty. This confuses any tests that assume that_fill_optional=True
will guarantee noNone
values.The text was updated successfully, but these errors were encountered: