I have two lines of code that read as follows:

if auth.user:
    if db.auth_user[auth.user.id]['image']=='' or db.auth_user[auth.user.id
]['image']==None:

Recently, while logged in, I dropped all the tables, refreshed the page and 
then got an Internal Error saying

 if db.auth_user[auth.user.id]['image']=='' or db.auth_user[auth.user.id][
'image']==None:
TypeError: 'NoneType' object has no attribute '__getitem__'

I'm guessing it has to do with cookies saving the session, where the web2py 
side recognizes what seems to be a session and building auth.user based off 
of this, but I'm not quite sure why auth.user is built without a query 
check of the database? I was wondering why this is?

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to