Re: Possible bug: Querying a model with an IntegerField value of 0 using mysql-connector/python returns a queryset where the field value becomes a NoneType 2.0.3.0

2018-08-20 Thread Marcus Grass
? > > > On Sunday, August 19, 2018 at 6:15:44 PM UTC-4, Marcus Grass wrote: >> >> Hi, I ran into a strange problem when i switched from using mysqlclient to >> mysql-connector/python. >> >> In practice: >> class Foo(models.Model): >> bar = model

Possible bug: Querying a model with an IntegerField value of 0 using mysql-connector/python returns a queryset where the field value becomes a NoneType 2.0.3.0

2018-08-19 Thread Marcus Grass
Hi, I ran into a strange problem when i switched from using mysqlclient to mysql-connector/python. In practice: class Foo(models.Model): bar = models.IntegerField(default=0, null=False) queryset = Foo.objects.all().filter(bar=0) print(queryset[0].bar) # prints None Anyone know a fix for thi