#2424: Django_admin will report errors when try to save objects, where another
object, which has a many_to_many field, is edit_inlined
--------------------------------+-------------------------------------------
 Reporter:  [EMAIL PROTECTED]  |       Owner:  jacob        
     Type:  defect              |      Status:  new          
 Priority:  normal              |   Milestone:  Version 0.93 
Component:  Contrib apps        |     Version:  magic-removal
 Severity:  normal              |    Keywords:               
--------------------------------+-------------------------------------------
 = Descriptions =
  * Django_admin will report errors when try to save objects, where another
 object, which has a many_to_many field, is edit_inlined
 
 = This is my model =
 {{{
 #!python
 Class A:
     ....
 
 Class B:
     field = ManyToManyField(ClassC);
     a = ForeignKey(A, edit_inline=meta.STACKED)
 }}}
 
 == Reproduce steps ==
  * Then when I try to create a A object in django_admin, it will report
 errors as 'set_field' not exist..
 
 = Django codes related =
 
 == django/db/models/manipulator.py ==
  * line 217
 {{{
 #!python
 for f in related.opts.many_to_many:
    if child_follow.get(f.name, None) and not f.rel.edit_inline:
         was_changed = getattr(new_rel_obj, 'set_%s' %
 f.name)(rel_new_data[f.attname])
    if self.change and was_changed:
         self.fields_changed.append('%s for %s "%s"' % (f.verbose_name,
 related.opts.verbose_name,
 }}}

-- 
Ticket URL: <http://code.djangoproject.com/ticket/2424>
Django <http://code.djangoproject.org/>
The web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates
-~----------~----~----~----~------~----~------~--~---

Reply via email to