Re: PositiveIntegerField returning a string?

2009-03-16 Thread Malcolm Tredinnick
On Mon, 2009-03-16 at 07:06 -0700, msoulier wrote: [...] > The code populating it looks like this > >metrics.user_licenses_ca = int( > details.get('Max_users', '0/0/0').split('/')[2]) > > The Max_users field contains a '/' delimited sting of three numbers, > which is why I'm

Re: PositiveIntegerField returning a string?

2009-03-16 Thread msoulier
On Mar 14, 1:35 am, Russell Keith-Magee wrote: > It's possible that this is a known bug that has been fixed since v0.96 > was released. Where exactly did metrics object come from? Is is a > newly created object, or was it obtained as the result of a query? It was created

Re: PositiveIntegerField returning a string?

2009-03-13 Thread Russell Keith-Magee
On Sat, Mar 14, 2009 at 3:11 AM, msoulier wrote: > > Hi, > > Django 0.96 (yes, I know, we'll be at 1.0.2. soon), and I have a model > full of PositiveIntegerField attributes. > > One of them is returning a string. > metrics.user_licenses_ca > '315'

PositiveIntegerField returning a string?

2009-03-13 Thread msoulier
Hi, Django 0.96 (yes, I know, we'll be at 1.0.2. soon), and I have a model full of PositiveIntegerField attributes. One of them is returning a string. >>> metrics.user_licenses_ca '315' >>> type(metrics.user_licenses_ca) PostgreSQL backend I thought that the PositiveIntegerField would