1👍
As far as I can tell, it is a bug in django. The workaround is:
(Team.objects.filter(users__user__is_active=True)
.annotate(team_member_count=Count('users'))
.filter(team_member_count__gte=1))
Source:stackexchange.com