jlaine/django-ldapdb — pull request #30 by Xaroth (2014-01-17 16:18:09+00:00)
Title: Move get_db_prep_save to before value checking.

When building a DefaultListField to serve the requirements of groupOfNames (which requires at least 1 member to be set), I came across this issue.
When saving, the list of members was [] .. the DefaultListField was then unable to process this to include a pre-set defined item (cn=admin, in my case), and as a result I was unable to save the object.

This means that, while the fields now have to check for None values in get_db_prep_save, those same fields can now save values that would evaluate to False (False, '', [], 0, etc) .. this also fixes the issue that IntegerField is unable to save the '0' value.