rohitjain-rj / django-tagging

Automatically exported from code.google.com/p/django-tagging
Other
0 stars 0 forks source link

with_all produces wrong results if queried for non-existing tag (by string) #185

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
How to reproduce:
MyModel.tagged.with_all('<existing_tag>, <non_existing_tag>')

Expected Result:
Empty Set

Actual Result:
QuerySet containing MyModel instances tagged with <existing_tag>

My Assumption what is wrong:
with_all uses TaggedItemManager.get_by_model. get_by_model uses get_tag_list to 
normalize 
the 'query' to a QuerySet - but get_tag_list omits non-existing tags.

Regards

Till

Original issue reported on code.google.com by tba...@googlemail.com on 4 Feb 2009 at 11:03