Python 3
[wolnelektury.git] / src / social / templatetags / social_tags.py
index 4cc6215..898d3ba 100755 (executable)
@@ -34,7 +34,7 @@ def render_cite(cite):
 @ssi_variable(register, patch_response=[ssi_vary_on_cookie])
 def book_shelf_tags(request, book_id):
     if not request.user.is_authenticated():
-        return None
+        return ''
     book = Book.objects.get(pk=book_id)
     lks = likes(request.user, book, request)
 
@@ -46,4 +46,4 @@ def book_shelf_tags(request, book_id):
             return ''
         ctx = {'tags': tags}
         return template.loader.render_to_string('social/shelf_tags.html', ctx)
-    return lazy(get_value, unicode)()
+    return lazy(get_value, str)()