Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #9341: add another on `ManyToManyField`s with `raw_id_admins` n…

…ow works correctly.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10452 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 6eaf154a2e81d21d02f3597dd0e3dad01db8d07c 1 parent 7d1b429
@jacobian jacobian authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 django/contrib/admin/media/js/admin/RelatedObjectLookups.js
View
6 django/contrib/admin/media/js/admin/RelatedObjectLookups.js
@@ -79,7 +79,11 @@ function dismissAddAnotherPopup(win, newId, newRepr) {
elem.options[elem.options.length] = o;
o.selected = true;
} else if (elem.nodeName == 'INPUT') {
- elem.value = newId;
+ if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) {
+ elem.value += ',' + newId;
+ } else {
+ elem.value = newId;
+ }
}
} else {
var toId = name + "_to";
Please sign in to comment.
Something went wrong with that request. Please try again.