Re: [web2py] Re: Storing logged on user in database

2011-08-31 Thread Chris Rowson
> Good to hear. > It's possible using auth.user_id might also fix it like that. > This is what it says in the book: > auth.user contains a copy of the db.auth_user records for the current logged > in user or None otherwise. There is also also a auth.user_id which is the > same as auth.user.id (i.e.

Re: [web2py] Re: Storing logged on user in database

2011-08-31 Thread pbreit
Also, just saw thus other thread which mentions that fields with a reference get an aotmatic is_in_db validator: https://groups.google.com/forum/m/#!topic/web2py/so3zcg1FvUI

Re: [web2py] Re: Storing logged on user in database

2011-08-30 Thread pbreit
Good to hear. It's possible using auth.user_id might also fix it like that. This is what it says in the book: auth.user contains a copy of the db.auth_user records for the current logged in user or None otherwise. There is also also a auth.user_id which is the same as auth.user.id (i.e. the id

Re: [web2py] Re: Storing logged on user in database

2011-08-30 Thread Chris Rowson
> You could perhaps try default=auth.user_id instead. I'm not totally sure if > that behaves differently. > I don't usually use is_in_db() so can't say for sure how that might be > affecting it. > Can you provide more of the error details? I think I *might* have fixed it about the same time as you

Re: [web2py] Re: Storing logged on user in database

2011-08-30 Thread pbreit
You could perhaps try default=auth.user_id instead. I'm not totally sure if that behaves differently. I don't usually use is_in_db() so can't say for sure how that might be affecting it. Can you provide more of the error details?

Re: [web2py] Re: Storing logged on user in database

2011-08-30 Thread Chris Rowson
> Looks OK at a high level. Is it working for you? I thought it was until I logged in and out a couple of times and then started getting an error: "AttributeError:'NoneType' object has no attribute 'id" Noticed a discussion here: http://comments.gmane.org/gmane.comp.python.web2py/44801 Seems to

[web2py] Re: Storing logged on user in database

2011-08-30 Thread pbreit
Looks OK at a high level. Is it working for you?