[web2py] Re: Field.Virtual: unexpected behaviour

2016-05-09 Thread Val K
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

[web2py] Re: Field.Virtual: unexpected behaviour

2016-05-09 Thread Val K
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

[web2py] Re: Field.Virtual: unexpected behaviour

2016-05-09 Thread Leonel Câmara
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