Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #162 -- Admin log now records repr() before calling delete(), i…

…nstead of after calling it() -- thanks, mfenniak@pobox.com!

git-svn-id: http://code.djangoproject.com/svn/django/trunk@324 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3c0c0e7317ebc5bb43faf8cdf24ca495ff154e91 1 parent b23c63b
Adrian Holovaty authored July 26, 2005

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/views/admin/main.py
2  django/views/admin/main.py
@@ -1056,8 +1056,8 @@ def delete_stage(request, app_label, module_name, object_id):
1056 1056
     if request.POST: # The user has already confirmed the deletion.
1057 1057
         if perms_needed:
1058 1058
             raise PermissionDenied
1059  
-        obj.delete()
1060 1059
         obj_repr = repr(obj)
  1060
+        obj.delete()
1061 1061
         log.log_action(request.user.id, opts.get_content_type_id(), object_id, obj_repr, log.DELETION)
1062 1062
         request.user.add_message('The %s "%s" was deleted successfully.' % (opts.verbose_name, obj_repr))
1063 1063
         return HttpResponseRedirect("../../")

0 notes on commit 3c0c0e7

Please sign in to comment.
Something went wrong with that request. Please try again.