Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@HonzaKral HonzaKral authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 django/contrib/admin/widgets.py
View
7 django/contrib/admin/widgets.py
@@ -172,12 +172,9 @@ def label_for_value(self, value):
return ''
def value_from_datadict(self, data, files, name):
- value = data.get(name, None)
- if value and ',' in value:
- return data[name].split(',')
+ value = data.get(name)
if value:
- return [value]
- return None
+ return value.split(',')
def _has_changed(self, initial, data):
if initial is None:
Please sign in to comment.
Something went wrong with that request. Please try again.