Mmmm ... I see. I actually went another route: I am passing all existing 
parameters to the update_record function, changing only the password. By 
passing the existing parameters, it seems the compute function is not 
called.

On Saturday, December 15, 2012 3:26:41 PM UTC+1, Massimo Di Pierro wrote:
>
> You can set 
>
> db.table.field.compute = lambda: ....
>
> only in the actions that need it.
>
> On Saturday, 15 December 2012 04:26:33 UTC-6, Daniel Gonzalez wrote:
>>
>> Hi,
>>
>> I am implementing a password update feature. I am doing something like 
>> this:
>>
>> def change_pass(email, new_pass):
>>     my_query = db[auth.settings.table_user_name].email == email
>>     my_set   = db(my_query)
>>     my_set.update(password = new_pass)
>>
>> The problem is that this is calling one of my compute definitions in one 
>> of the fields.
>>
>> Field('third_party_entity', compute=
>> big_and_ugly_code_only_intended_for_new_entries)
>>
>> My compute is not intended to be used for updates, but only for new 
>> record creations.
>> I do not want update to call the compute functions. Actually, I do not 
>> want update to do *anything* except updating the field that I 
>> am explicitly giving. Is this possible?
>>
>> Thanks,
>> Daniel Gonzalez
>>
>

-- 



Reply via email to