Added a bunch of NOT NULLs.
[zzz-floof.git] / floof / model / ratings.py
index 6b5850a..ab850b1 100644 (file)
@@ -3,9 +3,9 @@ from art import Art
 from floof.lib.dbhelpers import find_or_create, update_or_create
 
 class Rating(Entity):
-    art = ManyToOne('Art', ondelete='cascade')
-    rater = ManyToOne('User', ondelete='cascade')
-    score = Field(Integer)
+    art = ManyToOne('Art', ondelete='cascade', required=True)
+    rater = ManyToOne('User', ondelete='cascade', required=True)
+    score = Field(Integer, required=True)
 
     options = {-1:"sucks", 0:"undecided", 1:"good", 2:"great"}
     default = 0
@@ -23,4 +23,4 @@ class RatingMixin(object):
             return rating.score
         return Rating.default
 
-Art.__bases__ += (RatingMixin,)
\ No newline at end of file
+Art.__bases__ += (RatingMixin,)