On 04/05/2006, at 14:17, Michele Cella wrote:

>
> Alberto Valverde wrote:
>>
>> Hi Max,
>>
>> I'm experiencing this problem too ... seems that the Schema calls
>> from_python on every field and then adjust_value calls it again on
>> individual fields so vaue is double-from-pythonized...
>>
>> Can you try the attached patch see if it solves anything? It does in
>> my case (which is somewhat related but not with the same kind of  
>> field).
>>
>
> If this is the problem we can safely modify adjust_value so that it
> gets called only for the first widget in the chain since the schema
> generated here is the one that will be used for the validation it will
> avoid double from_python calls I guess.

I'm not sure it's the problem... I wanted Max to test the patch to  
confirm, but I'm pretty sure it is. Your proposal sounds good,  
however, I'm not sure how to implement it (maybe inspecting the  
'path' at CP.request?)

> Also note that in your patch the check for (not input_submitted) is
> redundant since there is a previous check that avoids this to happen
> (I'm fairly sure but I don't have time to look at the code ATM).

You're right, that check is inside the "else (not input_submitted)"  
so it's indeed redundant... :)

Alberto


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears Trunk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears-trunk
-~----------~----~----~----~------~----~------~--~---

Reply via email to