Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2500 -- Fixed bug in admin related-object pop-up window when u…

…sing a primary key value that isn't an integer. Thanks, Gary Wilson and deryck@samba.org

git-svn-id: http://code.djangoproject.com/svn/django/trunk@3553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 4805675f9d9fbce05428cabe3251f37764360824 1 parent 23964a7
Adrian Holovaty authored August 11, 2006

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

  1. 2  django/contrib/admin/views/main.py
2  django/contrib/admin/views/main.py
@@ -263,7 +263,7 @@ def add_stage(request, app_label, model_name, show_delete=False, form_url='', po
263 263
                     post_url_continue += "?_popup=1"
264 264
                 return HttpResponseRedirect(post_url_continue % pk_value)
265 265
             if request.POST.has_key("_popup"):
266  
-                return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, %s, "%s");</script>' % \
  266
+                return HttpResponse('<script type="text/javascript">opener.dismissAddAnotherPopup(window, %r, "%s");</script>' % \
267 267
                     (pk_value, str(new_object).replace('"', '\\"')))
268 268
             elif request.POST.has_key("_addanother"):
269 269
                 request.user.message_set.create(message=msg + ' ' + (_("You may add another %s below.") % opts.verbose_name))

0 notes on commit 4805675

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