diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-25 19:37:19 +0100 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2010-01-25 19:37:19 +0100 |
commit | a6039ae2fda5921084245ce027d7b708a70e9fa1 (patch) | |
tree | 1d6f978797b63b853140ce8303dfbb97a2320f7a | |
parent | fe7223827b8e9f33e2d5d1e50331491f8018ae7f (diff) |
Convert strings to unicode before adding pastes.
-rw-r--r-- | pastepy.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -69,7 +69,7 @@ class Paste(object): try: session = db.Session() - paste = db.Paste(hash, nick, datetime.datetime.utcnow(), syntax, title, text) + paste = db.Paste(hash, nick.decode('utf8'), datetime.datetime.utcnow(), syntax.decode('utf8') if syntax else None, title.decode('utf8'), text.decode('utf8')) session.add(paste) session.commit() finally: |