Permalink
Browse files

Allow multiple items to be selected

  • Loading branch information...
Jonny
Jonny committed Oct 12, 2011
1 parent 4a38690 commit 38fd29d50b3f540d3ed7982575f8afeaee4cdfa7
Showing with 1 addition and 1 deletion.
  1. +1 −1 sortedm2m/forms.py
View
@@ -63,7 +63,7 @@ def render(self, name, value, attrs=None, choices=()):
def value_from_datadict(self, data, files, name):
value = data.get(name, None)
if name in data:
- value = data[name]
+ value = data.getlist(name)
if isinstance(value, basestring):
return [v for v in value.split(',') if v]
return value

0 comments on commit 38fd29d

Please sign in to comment.