Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #14407 -- Simplified ManyToManyRawIdWidget.value_from_datadict,…

… Thanks tyrion!

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14283 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit f6a0b7cfe31367935cd124907b54fdd0b87ce261 1 parent 634d0a9
Honza Král authored October 19, 2010

Showing 1 changed file with 2 additions and 5 deletions. Show diff stats Hide diff stats

  1. 7  django/contrib/admin/widgets.py
7  django/contrib/admin/widgets.py
@@ -172,12 +172,9 @@ def label_for_value(self, value):
172 172
         return ''
173 173
 
174 174
     def value_from_datadict(self, data, files, name):
175  
-        value = data.get(name, None)
176  
-        if value and ',' in value:
177  
-            return data[name].split(',')
  175
+        value = data.get(name)
178 176
         if value:
179  
-            return [value]
180  
-        return None
  177
+            return value.split(',')
181 178
 
182 179
     def _has_changed(self, initial, data):
183 180
         if initial is None:

0 notes on commit f6a0b7c

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