Ticket #2155: manipulators.py.diff

File manipulators.py.diff, 696 bytes (added by remco@…, 18 years ago)
  • django/db/models/manipulators.py

     
    306306    from django.db.models.fields.related import ManyToOneRel
    307307    date_str = all_data.get(date_field.get_manipulator_field_names('')[0], None)
    308308    date_val = forms.DateField.html2python(date_str)
    309     if date_val is None:
     309    if date_val is None or date_val is '':
    310310        return # Date was invalid. This will be caught by another validator.
    311311    lookup_kwargs = {'%s__year' % date_field.name: date_val.year}
    312312    if isinstance(from_field.rel, ManyToOneRel):
Back to Top