X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/ae60b2a3949e96357477cc04f90fd0873cee8a92..5b24a1f3c00e9530f2f87b71f90c493a10a1499c:/src/social/forms.py 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):