X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/b2d342589a7889a3b096e7192453d53bd28eed7d..c742d70c5285e01898721fc1a5ffe236781c7828:/src/social/forms.py diff --git a/src/social/forms.py b/src/social/forms.py old mode 100755 new mode 100644 index 389185889..b3be6ebda --- 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):