Ticket #3258: savesubset.diff

File savesubset.diff, 540 bytes (added by Andrew Durdin <adurdin@…>, 18 years ago)

patch

  • django/newforms/models.py

     
    3636    for f in opts.fields + opts.many_to_many:
    3737        if isinstance(f, models.AutoField):
    3838            continue
    39         setattr(instance, f.attname, clean_data[f.name])
     39        if f.name in clean_data:
     40            setattr(instance, f.attname, clean_data[f.name])
    4041    if commit:
    4142        instance.save()
    4243    return instance
Back to Top