Permalink
Browse files

fix error reporting, where choices is list of flat values

  • Loading branch information...
1 parent eeb672f commit d36f6e7f24d5fc22076fc192d6f3174b0c1ee58c @zmolodchenko zmolodchenko committed Mar 9, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 mongoengine/base.py
View
@@ -252,7 +252,7 @@ def _validate(self, value):
elif value_to_check not in self.choices:
msg = ('Value must be %s of %s' %
(err_msg, unicode(self.choices)))
- self.error()
+ self.error(msg)
# check validation argument
if self.validation is not None:

0 comments on commit d36f6e7

Please sign in to comment.