X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b2d342589a7889a3b096e7192453d53bd28eed7d..c56dfc17c204f0b5c84523c14229a779d4c12089:/src/social/forms.py?ds=sidebyside diff --git a/src/social/forms.py b/src/social/forms.py index 389185889..b3be6ebda 100755 --- a/src/social/forms.py +++ b/src/social/forms.py @@ -27,7 +27,8 @@ class ObjectSetsForm(forms.Form): self._user = user data = kwargs.setdefault('data', {}) if 'tags' not in data and user.is_authenticated(): - data['tags'] = ', '.join(t.name for t in obj.tags.filter(category='set', user=user).iterator() if t.name) + data['tags'] = ', '.join( + obj.tags.filter(category='set', user=user).exclude(name__in=(None, '')).values_list('name', flat=True)) super(ObjectSetsForm, self).__init__(*args, **kwargs) def save(self, request):