Re: select_related() changes type of DecimalField?

2011-04-05 Thread Carsten Fuchs
Dear Ian, Am 04.04.2011 22:27, schrieb Ian: Yes, this appears to be a bug. If you would, please create a ticket for it in the Django Trac so that we don't forget about it. Gladly: http://code.djangoproject.com/ticket/15766 Best regards, Carsten -- Cafu - the open-source Game and

Re: select_related() changes type of DecimalField?

2011-04-04 Thread Ian
On Apr 4, 12:05 pm, Carsten Fuchs wrote: > Is this a bug in Django? > If not, is there a better solution to the problem than using > isinstance() in every place where I have to compare DecimalField values? > (I'm still quite new to Python, and might be overlooking

select_related() changes type of DecimalField?

2011-04-04 Thread Carsten Fuchs
Dear Django list, using Django 1.3 with Python 2.6.5 on Ubuntu 10.04 and mod_wsgi, with Oracle database, I've just experienced a case where the use of select_related() changes the result type of a DecimalField in a related object from decimal.Decimal to float (which in turn breaks my