that is indeed weird, but suggests its an issue with 
python-mysql-connector, not django.

https://docs.djangoproject.com/en/1.11/ref/databases/#mysql-db-api-drivers

As you can see there, mysqlclient is the django project recommended way to 
interface with mysql.  What are your reasons for going with 
mysql-connector-python?


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 = models.IntegerField(default=0, null=False)
>
> queryset = Foo.objects.all().filter(bar=0)
> print(queryset[0].bar)  # prints None
>
>
> Anyone know a fix for this?
>
> Using python 3.6.6, Django 2.0.3.0-
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6be9073b-34f1-445f-ba02-dabf09c9916c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to