commit 954d46cc3cf08251b2ef5fb8b266f80bedca6211
parent f0125e9b8a1cd4e0cff3cde36c33b45bd169e95e
Author: Felicia Hummel <felicia@partkeepr.com>
Date: Tue, 31 Jan 2017 16:09:41 +0100
Treat prices = 0 and null as no price, fixes #736
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PartKeepr/StatisticBundle/Services/StatisticService.php b/src/PartKeepr/StatisticBundle/Services/StatisticService.php
@@ -31,7 +31,7 @@ class StatisticService
$dql = "SELECT COUNT(p.id) FROM PartKeepr\PartBundle\Entity\Part p";
if ($withoutPrice === true) {
- $dql .= ' WHERE p.averagePrice IS NOT NULL';
+ $dql .= ' WHERE p.averagePrice > 0';
}
return $this->entityManager->createQuery($dql)->getSingleScalarResult();