我正在尝试过滤管理页面中下拉列表中显示的条目。
class GroupDepartmentMembership(models.Model):
department = models.ForeignKey('department.Department', related_name="group_memberships")
group = models.ForeignKey('group.Group', related_name="department_memberships", limit_choices_to={'pk__in': [m.group.pk for m in department.group_memberships.filter(lead__exact=True)]})
lead = models.BooleanField(default=True)
然后我在控制台中收到以下异常,没有任何其他堆栈跟踪。
你可以帮我发现错误吗?谢谢!由< main 启动的线程中的未处理异常.NewThreadStartup 实例位于0x28ff680>