I don't think this is documented, but when dealing with a join, you have to 
specify the table in order to use .update_record(). So, it would be:

record.organization.update_record(**db.organization._filter_fields(form.vars
))

Anthony

On Thursday, December 5, 2013 6:50:33 AM UTC-5, Yebach wrote:
>
> Hello
>
> I am trying to update records in user profile from form
>
> I have two tables that need to be updated
>
> auth_user and organization
>
> record = db((db.auth_user.organization==db.organization.id) & (
> db.auth_user.id == uid)).select().first()
>
> if form.process().accepted:
>             
> record.update_record(**db.organization._filter_fields(form.vars))
>
>
> I also tried the 
> https://groups.google.com/forum/#!topic/web2py/hpH7a3Qz3Wg but kind of 
> the same problem
>
> I am getting the following error
> <type 'exceptions.KeyError'> 'update_record'
>
>
> thank you in advance
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to