From 111c85fbee4b4909c04f67233d477c673001fe6f Mon Sep 17 00:00:00 2001 From: Kethankrk Date: Tue, 13 Aug 2024 18:50:22 +0530 Subject: [PATCH] Fixed karma pow total function error --- api/common/common_consumer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/common/common_consumer.py b/api/common/common_consumer.py index 191ddaf0..36516aa8 100644 --- a/api/common/common_consumer.py +++ b/api/common/common_consumer.py @@ -50,7 +50,7 @@ def learning_circles_count(self): return learning_circles_count def karma_pow_count(self): - karma_pow_count = KarmaActivityLog.objects.aaggregate(karma_count=Sum('karma'), pow_count=Count('id')) + karma_pow_count = KarmaActivityLog.objects.aggregate(karma_count=Coalesce(Sum('karma'), 0), pow_count=Count('id')) return karma_pow_count def get_data(self, sender):