X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b2d342589a7889a3b096e7192453d53bd28eed7d..5b312d5dfc897d291d4d4ed159fc25d7f5493d41:/src/social/forms.py?ds=inline 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):