Django queryset objects return None instead of 0 even though the database has 0 stored as the field value

笑着哭i 提交于 2019-12-01 13:35:55
Tom Jimkes

If anyone is still running into this problem (as I did), I found a solution that worked for me. In the database configuration in the settings.py file, add the following option:

'OPTIONS': {'use_pure': True }

This resolved the problem for me. Hope this helps.

pass null argument to all those fields.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!