Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.0.X] Fixed #9341: add another on `ManyToManyField`s with `raw_id_a…

…dmins` now works correctly. Backport of r10452 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10453 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3891c137d41dfe8d1b06fdf468598d1651b232f8 1 parent e013c78
Jacob Kaplan-Moss jacobian authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 django/contrib/admin/media/js/admin/RelatedObjectLookups.js
6 django/contrib/admin/media/js/admin/RelatedObjectLookups.js
View
@@ -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.