Ticket #5450: save_m2m_with_new_instance.diff
File save_m2m_with_new_instance.diff, 566 bytes (added by , 17 years ago) |
---|
-
django/newforms/models.py
36 36 continue 37 37 f.save_form_data(instance, cleaned_data[f.name]) 38 38 # Wrap up the saving of m2m data as a function 39 def save_m2m(): 39 def save_m2m(*args): 40 instance = args and args[0] or instance 40 41 opts = instance.__class__._meta 41 42 cleaned_data = form.cleaned_data 42 43 for f in opts.many_to_many: