Author: mtredinnick
Date: 2008-09-17 03:59:55 -0500 (Wed, 17 Sep 2008)
New Revision: 9063

Modified:
   django/trunk/django/contrib/admin/options.py
Log:
Changed a slightly suspicious usage of request.POST to request.method == 'POST'.
Refs #9014 (not the root cause of that bug, but discovered whilst people were
diagnosing it).


Modified: django/trunk/django/contrib/admin/options.py
===================================================================
--- django/trunk/django/contrib/admin/options.py        2008-09-17 08:10:55 UTC 
(rev 9062)
+++ django/trunk/django/contrib/admin/options.py        2008-09-17 08:59:55 UTC 
(rev 9063)
@@ -558,7 +558,7 @@
         if obj is None:
             raise Http404('%s object with primary key %r does not exist.' % 
(force_unicode(opts.verbose_name), escape(object_id)))
 
-        if request.POST and request.POST.has_key("_saveasnew"):
+        if request.method == 'POST' and request.POST.has_key("_saveasnew"):
             return self.add_view(request, form_url='../../add/')
 
         ModelForm = self.get_form(request, obj)


--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to