Hi Seberino, Which numbers in your model become decimal ? It is possible to multiply decimals by ints, it does not raise error, this just returns a new decimal instance... Your problem may be somewhere after the multiplication at the time you try to use the result and make an assertion that the number is an integer.
If you have an integer in your sql db and declared the same type in the SO model then you should receive an integer in your template also. There is no magic type coercion in TG. Maybe you could paste some sample code in the tg pastebin [1] so we could look at the problem. Regards, Florent. [1] : http://paste.turbogears.org/ On 8/13/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > In my Kid templates I do some math on some model variables passed in. > > It appears some SQLObject numbers are treated as Decimal objects which > gives errors when I try to multiply them by ints. > > I solved this problem by casting Decimal variables down to floats. > > Is this the recommended way to handle this? > (I noticed I didn't get this error in an older version of TurboGears. > I guess this error is a good thing or does it go away in a newer TG > version?) > > > Chris > > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" 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?hl=en -~----------~----~----~----~------~----~------~--~---

