From f10c11192524d92e537a57d54ef3641014645376 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Fri, 26 Feb 2010 11:41:53 +0200 Subject: [PATCH] Fixed a problem with the tags. --- scribeengine/controllers/post.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scribeengine/controllers/post.py b/scribeengine/controllers/post.py index 9cc5232..6f695e3 100644 --- a/scribeengine/controllers/post.py +++ b/scribeengine/controllers/post.py @@ -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)))