Don't turn tags surrounded by [] into collections

This commit is contained in:
Kovid Goyal 2010-05-19 18:00:46 -06:00
parent b97141b208
commit b910e737c6

View File

@ -124,6 +124,9 @@ class BookList(_BookList):
elif isinstance(val, unicode): elif isinstance(val, unicode):
val = [val] val = [val]
for category in val: for category in val:
if attr == 'tags' and len(category) > 1 and \
category[0] == '[' and category[-1] == ']':
continue
if category not in collections: if category not in collections:
collections[category] = [] collections[category] = []
if book not in collections[category]: if book not in collections[category]: