0
点赞
收藏
分享

微信扫一扫

将list对象转换为QuerySet对象

仲秋花似锦 2022-06-03 阅读 180

学习笔记,仅供参考,有错必纠

school = models.College.objects.get(school = school)
teams_temp = models.Team.objects.filter(school = school,
status_is_pass = "通过")

teams = [t.id for t in teams_temp if t.work.status != "未上传"]
teams = models.Team.objects.filter(id__in = teams)


举报

相关推荐

0 条评论