diff --git a/django/contrib/admin/media/js/admin/RelatedObjectLookups.js b/django/contrib/admin/media/js/admin/RelatedObjectLookups.js index db4ed1a9d17..e5e05a7e325 100644 --- a/django/contrib/admin/media/js/admin/RelatedObjectLookups.js +++ b/django/contrib/admin/media/js/admin/RelatedObjectLookups.js @@ -30,7 +30,12 @@ function dismissRelatedLookupPopup(win, chosenId) { function showAddAnotherPopup(triggeringLink) { var name = triggeringLink.id.replace(/^add_/, ''); name = name.replace(/\./g, '___'); - var win = window.open(triggeringLink.href + '?_popup=1', name, 'height=500,width=800,resizable=yes,scrollbars=yes'); + href = triggeringLink.href + if (href.indexOf('?') == -1) + href += '?_popup=1'; + else + href += '&_popup=1'; + var win = window.open(href, name, 'height=500,width=800,resizable=yes,scrollbars=yes'); win.focus(); return false; }