- if category:
- real_tags.append(Tag.objects.get(slug=name, category=category))
- category = None
- else:
- try:
- real_tags.append(Tag.objects.exclude(category='book').get(slug=name))
- except Tag.MultipleObjectsReturned, e:
- ambiguous_slugs.append(name)
+ try:
+ real_tags.append(Tag.objects.exclude(category='book').get(slug=name))
+ deprecated = True
+ except Tag.MultipleObjectsReturned, e:
+ ambiguous_slugs.append(name)