今天在写客户管理系统的时候遇到了一个特别傻帽的bug,卡在这个bug几个小时,错误如下:
_filter_or_exclude() argument after ** must be a mapping, not set
一开始以为是ModelForm错误了,一直在找ModelForm的错误,后来去检查数据库表的,发现一个字段设置了limit_choices_to={},字典内没有传任何值,删掉limit_choices_to就可以了