﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29579	Objects count after Many to many related query shows wrong	noufalvlpr	nobody	"
{{{
class Standard(models.Model):
    name = models.CharField(max_length=30)
    created_at = models.DateField(null=True, blank=True)


class Product(models.Model):
    name = models.CharField(max_length=30, null=True)
    standards = models.ManyToManyField(Standard, related_name='products')
}}}


created standards with created_at=Null, added some standards to product and after


{{{
Product.objects.count()  # 6
Product.objects.filter(standards__created_at__isnull=True).count()  # 7
}}}
"	Bug	closed	Database layer (models, ORM)	2.0	Normal	invalid			Unreviewed	0	0	0	0	0	0
