mirror of
https://github.com/django/django.git
synced 2025-10-24 22:26:08 +00:00
Simplified Count.convert_value() and RegrCount.convert_value().
This commit is contained in:
@@ -42,9 +42,7 @@ class RegrCount(StatAggregate):
|
||||
output_field = IntegerField()
|
||||
|
||||
def convert_value(self, value, expression, connection):
|
||||
if value is None:
|
||||
return 0
|
||||
return int(value)
|
||||
return 0 if value is None else value
|
||||
|
||||
|
||||
class RegrIntercept(StatAggregate):
|
||||
|
||||
Reference in New Issue
Block a user