On Tue, 20 Aug 2019 at 07:00, Deep Shah <[email protected]> wrote:
> Hi All,
> I am migrating table from existing table which has primary key with two
> fields.
> After migrating the table i created SQLFORM.grid and used selectable to
> process the selected tuples.
> selectable = [('Approve Selected names', lambda ids: approve_name(ids))]
>
> Its giving the following error.
> <type 'exceptions.AttributeError'> 'Table' object has no attribute '_id'
>
> How do i solve this error keeping both field as key
>
>
Just add an id-column as a serial field. It is not necessary for it to be
the primary key. If you need to use the primary key for references, use
executesql.
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
--
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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/CAGZ55DQUWDk%2BcCik5GQTXnoN-yHg94zN-69D73T-ANdbm2L8mg%40mail.gmail.com.