It is not finding the record db.auth_group(description="Teacher") Not sure it is a dal problem,
On Sep 28, 2:50 pm, felixdm <joi....@gmail.com> wrote: > I have this problem in GAE > > Traceback (most recent call last): > File "/base/data/home/apps/s~book-on/1.353593485285740911/gluon/ > restricted.py", line 194, in restricted > exec ccode in environment > File "/base/data/home/apps/s~book-on/1.353593485285740911/ > applications/bookon/controllers/default.py:user", line 204, in > <module> > File "/base/data/home/apps/s~book-on/1.353593485285740911/gluon/ > globals.py", line 149, in <lambda> > self._caller = lambda f: f() > File "/base/data/home/apps/s~book-on/1.353593485285740911/ > applications/bookon/controllers/default.py:user", line 149, in user > AttributeError: 'NoneType' object has no attribute 'id' > > if request.args(0)=="register": > if not request.args(1) or (request.args(1)!="teacher" > and > request.args(1)!="student" and request.args(1)!="institution"): > redirect(URL(r=request,c='default',f='index')) > > form=SQLFORM(db.auth_user,fields=['fullname','email','password','username'] > ,formstyle='divs') > > if form.accepts(request.vars, session, dbio=True): > > if request.args(1)=="teacher": > > tid = > db.auth_group(description="Teacher").id <- 149 > NoneType DAL problem? > username_id = > db.auth_user(username=request.vars['username']).id > auth.add_membership( tid , > username_id)