Permalink
Browse files

Merge pull request #245 from zmolodchenko/patch-1

fix error reporting, where choices is list of flat values
  • Loading branch information...
2 parents eeb672f + d36f6e7 commit 9f58bc9207a874a91f0165e8ff2f546088097fb2 @rozza rozza committed Mar 12, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 mongoengine/base.py
View
2 mongoengine/base.py
@@ -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 9f58bc9

Please sign in to comment.