If you use session be aware that the value you put in session will remain
there for the duration of the session, so you need to carefully reset them
or init them in order to not create bug...

As Dave S mention SQLFORM() wouldn't maybe suffer from this issue as you
can do that :

form = SQLFORM(...)
form.vars.volunteer_id = ...
if form.process().accept:
...

Richard

On Thu, Mar 10, 2016 at 3:35 PM, Dave S <[email protected]> wrote:

>
>
> On Thursday, March 10, 2016 at 12:01:47 PM UTC-8, David Orme wrote:
>>
>> That's the problem - the auth_user row _can't_ be retrieved because
>> form.vars.volunteer_id is None.
>>
>
> Is this one of the places you should set it in your controller before
> calling form.process()?
>
> In regular SQLFORM, that's how (AIUI) you set a default value, and it
> works for writable=False and hidden fields (again, AIUI).
>
> Is this post helpful?
> <URL:https://groups.google.com/d/msg/web2py/HF95xbM8Hs4/MR8cM9G3FgAJ>
>
> /dps
>
>
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> 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 [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to