Commits

Anonymous committed 92983e2

ReferencePropertyField: fix missing ValidationError, and in addition update for translation hooks. Refs #32, Fixes #37.

Comments (0)

Files changed (2)

 WTForms Changelog
 =================
 
+Version 0.6.1
+-------------
+Not yet released.
+
+- Add support for providing a translations object that can translate built-in
+  validation and coercion errors
+
+- Fields:
+  * Bugfixes and cleanup in ReferencePropertyField, dateutil fields.
+
 Version 0.6
 -----------
 Released April 25th, 2010.

wtforms/ext/appengine/fields.py

         self.blank_text = blank_text
         self._set_data(None)
         if reference_class is None:
-            raise ValueError('Missing reference_class attribute in '
+            raise TypeError('Missing reference_class attribute in '
                              'ReferencePropertyField')
 
         self.query = reference_class.all()
                 if self.data == str(obj.key()):
                     break
             else:
-                raise ValidationError('Not a valid choice')
+                raise ValueError(self.gettext(u'Not a valid choice'))
 
 
 class StringListPropertyField(fields.TextAreaField):