From 0aff292bcfacf23d5721dec6dcce9e64889740cb Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Wed, 17 Sep 2008 08:59:55 +0000 Subject: [PATCH] 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). git-svn-id: http://code.djangoproject.com/svn/django/trunk@9063 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/contrib/admin/options.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py index ea322dab14..7f464baec3 100644 --- a/django/contrib/admin/options.py +++ b/django/contrib/admin/options.py @@ -558,7 +558,7 @@ class ModelAdmin(BaseModelAdmin): 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)