Skip to content

Commit

Permalink
[1.0.X] Fixed #9341: add another on ManyToManyFields with `raw_id_a…
Browse files Browse the repository at this point in the history
…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
jacobian committed Apr 8, 2009
1 parent e013c78 commit 3891c13
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion django/contrib/admin/media/js/admin/RelatedObjectLookups.js
Expand Up @@ -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";
Expand Down

0 comments on commit 3891c13

Please sign in to comment.