[Answer]-Django: Filtering on annotated value with gte integer results into comparison with True in SQL

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))

Leave a comment