Commit d72afae0 by Frank Wiles

Fixed suggest_tags() to properly use the ORM

parent b91417b0
...@@ -47,8 +47,4 @@ def suggest_tags(content=None): ...@@ -47,8 +47,4 @@ def suggest_tags(content=None):
suggested_regexps = _suggest_regexps(content) suggested_regexps = _suggest_regexps(content)
suggested_tag_ids = suggested_keywords | suggested_regexps suggested_tag_ids = suggested_keywords | suggested_regexps
# Turn the found IDs into tags return Tag.objects.filter(id__in=suggested_tag_ids)
where_string = 'id IN (%s)' % ','.join([str(x) for x in suggested_tag_ids])
tags = Tag.objects.extra(where=[where_string])
return tags
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment