Ticket #8746: raw_id_field_more_tolerant.diff
File raw_id_field_more_tolerant.diff, 546 bytes (added by , 16 years ago) |
---|
-
django/contrib/admin/widgets.py
174 174 def value_from_datadict(self, data, files, name): 175 175 value = data.get(name, None) 176 176 if value and ',' in value: 177 return data[name].split(',')177 return filter(None, [v.strip() for v in data[name].split(',')]) 178 178 if value: 179 179 return [value] 180 180 return None