small fix in plain list
authorJan Szejko <janek37@gmail.com>
Fri, 18 Aug 2017 11:45:11 +0000 (13:45 +0200)
committerJan Szejko <janek37@gmail.com>
Fri, 18 Aug 2017 11:45:11 +0000 (13:45 +0200)
src/catalogue/templatetags/catalogue_tags.py

index afb2e7e..f14cfa7 100644 (file)
@@ -354,6 +354,8 @@ def plain_list(context, object_list, with_initials=True, by_author=False, choice
                 last_initial = initial
                 names.append((obj.author_unicode() if by_author else initial, []))
         names[-1][1].append(obj)
                 last_initial = initial
                 names.append((obj.author_unicode() if by_author else initial, []))
         names[-1][1].append(obj)
+    if names[0] == ('', []):
+        del names[0]
     return {
         'paged': paged,
         'names': names,
     return {
         'paged': paged,
         'names': names,