add missing custom format_value for multi select widget (#25966)

This commit is contained in:
Thomas NOËL 2018-08-30 14:58:23 +02:00
parent 9c69420972
commit a90c6740a8
1 changed files with 4 additions and 0 deletions

View File

@ -67,3 +67,7 @@ class MultiSortWidget(forms.SelectMultiple):
if isinstance(data, MultiValueDict):
return {'data': data.getlist(name)}
return data.get(name, None)
def format_value(self, value):
value = value.get('data') or []
return super(MultiSortWidget, self).format_value(value)