tags = [tag for tag in [tagmap.get(name.strip()) for name in post.tagnames.split(u' ') if name] if tag]
post.tagnames = " ".join([t.name for t in tags]).strip()
post.tags = tags
tags = [tag for tag in [tagmap.get(name.strip()) for name in post.tagnames.split(u' ') if name] if tag]
post.tagnames = " ".join([t.name for t in tags]).strip()
post.tags = tags