django-recurrence/django-recurrence — pull request #10 by dominicrodger (2013-01-07 18:51:20+00:00)
Title: Can't save None into a RecurrenceField

This change also adds the first of hopefully many more test
cases for django-recurrence.

Previously, if you had a model with a RecurrenceField like
this:

recurs = RecurrenceField(null=True)

You'd get a SerializationError raised when you did this:

MyModel.create(recurs=None)

With these changes, this can be saved as expected.

This change also fixes the next problem - saving None to
fields with null=False. With the first change, we got an
IntegrityError, since we now allow None values, but didn't
check for them before trying to save.

Note that none of this affects what happens if you're using
the recurrence widget (for example, if you save a value
through the admin) without modifying the default values.
There, you get a defaulted Recurrence object, not None.