Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

newforms-admin: Fixed #6938 -- request.GET is now coerced into a dict…

… before being passed as initial data in ModelAdmin.add_view. Thanks Matthias Pronk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/newforms-admin@7434 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 04932c6f1649672a6d09fa8eff4ef99e6af8aaac 1 parent de072d8
Brian Rosner brosner authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/contrib/admin/options.py
2  django/contrib/admin/options.py
View
@@ -469,7 +469,7 @@ def add_view(self, request, form_url=''):
if all_valid(inline_formsets) and form.is_valid():
return self.save_add(request, model, form, inline_formsets, '../%s/')
else:
- form = ModelForm(initial=request.GET)
+ form = ModelForm(initial=dict(request.GET.items()))
for FormSet in self.get_formsets(request):
inline_formset = FormSet(instance=obj)
inline_formsets.append(inline_formset)
Please sign in to comment.
Something went wrong with that request. Please try again.