Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Jacob Kaplan-Moss authored April 08, 2009
6  django/contrib/admin/media/js/admin/RelatedObjectLookups.js
@@ -79,7 +79,11 @@ function dismissAddAnotherPopup(win, newId, newRepr) {
79 79
             elem.options[elem.options.length] = o;
80 80
             o.selected = true;
81 81
         } else if (elem.nodeName == 'INPUT') {
82  
-            elem.value = newId;
  82
+            if (elem.className.indexOf('vManyToManyRawIdAdminField') != -1 && elem.value) {
  83
+                elem.value += ',' + newId;
  84
+            } else {
  85
+                elem.value = newId;
  86
+            }
83 87
         }
84 88
     } else {
85 89
         var toId = name + "_to";

0 notes on commit 6eaf154

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