I have this in my model: db.py:

db.define_table('user',
                SQLField('email', 'string', length=320),
                SQLField('hash','string'))
db.user.email.requires=[IS_NOT_EMPTY(),IS_LOWER(),IS_NOT_IN_DB(db,
db.user.email)]

In my controller: default.py:

try:
uid = db.user.insert(email=request.vars.email,
                                   hash=converted)
except:
   etc...

I can execute the controller code again and again with the same value
in request.vars.email with success. I was expecting an exception to be
throw (which I would catch) when I tried to insert an existing email
address.

What am I missing?

Can anyone help?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to