-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Use case:
{{{
if not User.find(db, {'email': form.email.data}):
raise wtforms.ValidationError(u'Unknown e-mail')
}}}
This does not work because {{{bool(MongoResultSet)}}} doesn't check whether the query yields any results. We need to call {{{.count()}}} or coerse the object to list. This should be done internally (probably via {{{.count()}}}).
Note: This issue has been automatically migrated from Bitbucket
Created by @neithere on 2012-02-07 16:18:27+00:00