summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2010-01-27 16:04:53 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2010-01-27 16:04:53 +0100
commit99c8cce4e0f06bf5b84c757ce2b5120d176da5d5 (patch)
treea1329223fad0f4e214c5f8f4d057424ad74712cb
parent7ae6693f33ee4c7f92729dd0e076491421427063 (diff)
Don't allow cache text to be None.
-rw-r--r--db.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/db.py b/db.py
index 9885b4e..1c76ad2 100644
--- a/db.py
+++ b/db.py
@@ -36,7 +36,7 @@ class Cache(Base):
paste_hash = Column(String, ForeignKey('paste.hash'), index = True)
paste = relation(Paste, primaryjoin = paste_hash == Paste.hash, lazy = False)
syntax_name = Column(String)
- text = Column(Text)
+ text = Column(Text, nullable = False)
def __init__(self, hash, syntax_name, text):
self.paste_hash = hash