it seems that `try-except` catches key/attribute error while evaluating
field.virtual and if it happens - doesn't create field.virtual at all
On Monday, May 9, 2016 at 7:17:07 PM UTC+3, Val K wrote:
>
> all a little differently:
> Field.Virtual('alias_name', lambda row: *None*) #- works OK! i.e
all a little differently:
Field.Virtual('alias_name', lambda row: *None*) #- works OK! i.e.
row.alias_name
*exists* and row.alias_name == *None*
*but *
Field.Virtual('alias_name', lambda row: row.*bla_bla*) #- causes that row.
alias_name *doesn't* *exist at all!*
On Monday, May 9, 2016 at 7:05
Well the thing is
row.*neverhood_will_be_processed_without_any_errors*
Doesn't cause any error because row just returns None for values that
aren't there so the virtual field will just have None as the value. I do
agree it is sort of counter-intuitive that you have to be explicit about
the ta
3 matches
Mail list logo