Ticket #3727: newforms_save_instance.diff
File newforms_save_instance.diff, 642 bytes (added by , 18 years ago) |
---|
-
django/newforms/models.py
36 36 raise ValueError("The %s could not be changed because the data didn't validate." % opts.object_name) 37 37 clean_data = form.clean_data 38 38 for f in opts.fields: 39 if not f.editable or isinstance(f, models.AutoField): 39 if not f.editable or isinstance(f, models.AutoField) \ 40 or f.name not in clean_data: 40 41 continue 41 42 setattr(instance, f.name, clean_data[f.name]) 42 43 if commit: