Skip to content

Commit

Permalink
Fix of documentation for ModelSelect2TagWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
pawnhearts authored and codingjoe committed Nov 23, 2022
1 parent 4770f06 commit f4eb656
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_select2/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def value_from_datadict(self, data, files, name):
# You need to implement this method yourself, to ensure proper object creation.
pks = self.queryset.filter(**{'pk__in': list(values)}).values_list('pk', flat=True)
pks = set(map(str, pks))
cleaned_values = list(values)
cleaned_values = list(pks)
for val in values - pks:
cleaned_values.append(self.queryset.create(title=val).pk)
return cleaned_values
Expand Down

0 comments on commit f4eb656

Please sign in to comment.