Browse files

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: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent a10fcbd commit 0aff292bcfacf23d5721dec6dcce9e64889740cb @malcolmt malcolmt committed Sep 17, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/contrib/admin/
@@ -558,7 +558,7 @@ def change_view(self, request, object_id, extra_context=None):
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)

0 comments on commit 0aff292

Please sign in to comment.