1 | | I've just confirmed that I get this same behaviour as described by jonash. I am willing to work on a patch for this if this bug is accepted. |
| 1 | I've just confirmed that I get this same behaviour as described by jonash. I don't believe that disallowing the overriding of choices is an appropriate solution as it is useful in cases where the Boolean values resemble a meaning. I think the way forward is to disable the override in the init method. Here's a quick update for the __init__ method: |
| 2 | |
| 3 | {{{ |
| 4 | def __init__(self, *args, **kwargs): |
| 5 | if 'choices' not in kwargs: |
| 6 | kwargs['blank'] = True |
| 7 | super(BooleanField, self).__init__(*args, **kwargs) |
| 8 | }}} |
| 9 | |
| 10 | This code gives the desired behaviour: if a Null value is specified when choices are overridden, then it will not be updated. |