[bug] Flask:jinja2.exceptions.UndefinedError: 'None' has no attribute 'id'

问题

Python Flask做的购物网站,添加购物车时,提示错误

解决

检查发现是MySQL中不正常的空数据导致,删除此条记录即可

参考

https://www.jb51.cc/python/186119.html

原文地址:https://www.cnblogs.com/cxc1357/p/13703207.html