diff --git a/core/apps/finance/management/commands/count.py b/core/apps/finance/management/commands/count.py index 6ef8624..02ae631 100644 --- a/core/apps/finance/management/commands/count.py +++ b/core/apps/finance/management/commands/count.py @@ -7,7 +7,8 @@ def get_duplicate_expenses_all(): Barcha counterparty boyicha bir xil summada yaratilgan expenselarni topadi """ expences = Expence.objects.filter( - is_deleted=False + is_deleted=False, + counterparty__isnull=False ).values('counterparty', 'price', 'currency').annotate( count=Count('id') ).filter(count__gt=1).order_by('-count') @@ -40,4 +41,5 @@ class Command(BaseCommand): }) print(result) + print(len(result))