From 8f5204a17b02c34cf133276a085178a9f196be82 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Sun, 7 Sep 2025 20:41:09 -0300 Subject: [PATCH] feat(rules): add .exclude() to transactions() function --- app/apps/rules/utils/transactions.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/apps/rules/utils/transactions.py b/app/apps/rules/utils/transactions.py index eac1305..a81c68e 100644 --- a/app/apps/rules/utils/transactions.py +++ b/app/apps/rules/utils/transactions.py @@ -15,6 +15,9 @@ class TransactionsGetter: def __init__(self, **filters): self.__queryset = Transaction.objects.filter(**filters) + def exclude(self, **exclude_filters): + self.__queryset = Transaction.objects.exclude(**exclude_filters) + @property def sum(self): return self.__queryset.aggregate(