Fixed a problem with the tags.

This commit is contained in:
Raoul Snyman 2010-02-26 11:41:53 +02:00
parent 7ae53206e1
commit f10c111925

View File

@ -84,7 +84,8 @@ class PostController(BaseController):
db_tags = Session.query(Tag).filter(Tag.url.in_(tag_urls)).all()
post.tags = []
for tag in db_tags:
tag_list.remove(tag.name)
if tag.name in tag_list:
tag_list.remove(tag.name)
post.tags.append(tag)
for tag in tag_list:
post.tags.append(Tag(name=tag, url=utils.generate_url(tag)))