#14017: Wrong comment in django.contrib.admin.options log_deletion
----------------------------------+-----------------------------------------
 Reporter:  akaariai              |       Owner:  nobody    
   Status:  new                   |   Milestone:            
Component:  django.contrib.admin  |     Version:  1.2       
 Keywords:                        |       Stage:  Unreviewed
Has_patch:  0                     |  
----------------------------------+-----------------------------------------
 Comment of django.contrib.admin.options log_deletion says:

 {{{
 Log that an object has been successfully deleted. Note that since the
 object is deleted, it might no longer be safe to call *any* methods
 on the object, hence this method getting object_repr.
 }}}

 However this function is called before the object is deleted (from
 admin.actions delete_selected() and admin.options delete_view().

 The changeset that changed the order of obj.delete() and log_deletion() is
 r10686 fixing the issue reported in #10889. The reason for the change is
 that log_deletion needs the pk of the object, but this is set to none when
 obj.delete() is called.

 The comment should probably mention that this function is called before
 deletion, as opposed to log_change and log_addition.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/14017>
Django <http://code.djangoproject.com/>
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 django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to