Pydal validator IS_NOT_IN_DB fails in auth.user table

49 views
Skip to first unread message

Jacinto Parga

unread,
May 6, 2021, 5:57:12 AM5/6/21
to web2py-users
Hello, 

This is an old issue not solved yet.

I think it is an issue that comes from previous version. It has to do with IS_NOT_IN_DB validator and auth. It worked in 2.17.2 version with no problem

Traceback (most recent call last): 
 File "/base/data/home/apps/e~xxxxxxxxxxxxx-/218.431301544681755891/gluon/restricted.py", line 219, in restricted exec(ccode, environment) 
 File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/applications/myapp/controllers/mycontroller.py", line 199, in <module> 
 File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/gluon/globals.py", line 430, in <lambda> self._caller = lambda f: f() 
 File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/gluon/tools.py", line 3875, in f return action(*a, **b) 
 File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/applications/myapp/controllers/mycrontroller.py", line 110, in crear_usuario if form.accepts(request.vars, session): 
 File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/gluon/sqlhtml.py", line 1790, in accepts **kwargs 
 File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/gluon/html.py", line 2162, in accepts status = self._traverse(status, hideerror) 
 File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/gluon/html.py", line 921, in _traverse newstatus = c._traverse(status, hideerror) and newstatus 
  File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/gluon/html.py", line 921, in _traverse newstatus = c._traverse(status, hideerror) and newstatus 
 File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/gluon/html.py", line 921, in _traverse newstatus = c._traverse(status, hideerror) and newstatus 
 File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/gluon/html.py", line 921, in _traverse newstatus = c._traverse(status, hideerror) and newstatus 
 File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/gluon/html.py", line 928, in _traverse newstatus = self._validate() 
 File "/base/data/home/apps/e-myapp-dir/218.431301544681755891/gluon/html.py", line 1908, in _validate raise Exception(msg) 
Exception: Validation error, field:email <pydal.validators.IS_NOT_IN_DB object at 0x3ebef34de910>

This is the code of the controller where it breaks


    form = SQLFORM(db.auth_user)
    if form.accepts(request.vars, session):

It also fails in appadmin db.auth_user new record

Reply all
Reply to author
Forward
0 new messages