I will take a look tomorrow to see if I can code something up to reproduce
the error.
Which tackle are you setting as the 'primary' table, by that I mean what
field are you specifying in the field_id parameter? And, is there ALWAYS a
matching record in the secondary table?
Oh, just thought of
Jom, you said " I'm having trouble understanding why you need the
try/except" - this is exactly the trouble I'm having too :)
I do use the left join. So I should simply specify the table name - correct?
Well, if I do - then the grid itself works fine, but once I click "view" or
"edit" - it
I'm having trouble understanding why you need the try/except. To me it
seems like "if you specify a left" -> you need to use the table name. "if
you don't specify a left" -> omit the table name
Do you have an occasion where sometimes different rows in the same grid
require you to specify the
But shouldn't it be the same for the grid and for the record of the grid?
The difference confuses me - having to specify the table should be
consistent when I use the grid for all the transactions of the
grid, including view/edit etc..
In other words, having to specify the table is perfectly fine
I think that is a result of having a left join specified. With the left
join you now have to specify which table the field is in as well.
Or, am I missing something?
-Jim
On Wed, Oct 7, 2020 at 9:13 PM Eliezer (Vlad) Tseytkin <
westgate6...@gmail.com> wrote:
> Jim,
>
> Thank you for the
Jim,
Thank you for the suggestions.
I do specify field_id (it wasn't there in the simplified code, but the
complete code does have it).
When I use a function, instead of the lambda, I indeed can have a solution,
but at the same time it emphasizes that something is wrong:
The links are now
I have a couple of ideas, but none are tested
First, can you try adding the field_id parameter to your SQLFORM.grid()
call? I believe that tells this grid which is your 'primary' table.
Secondly (this is the way I typically handle it) - instead of coding
everything in a lambda, call a
Seems to me this is an inconsistency in the way how grid operates (which
breaks it, as I show below, but, of course, most probably I am just missing
something.)
The following code crashes:
query = db.cart
fields = [db.cart.id]
links = [dict(header='View', body=lambda row:
8 matches
Mail list logo