fix - calculate distributions in quota remainng signal with assigner organization

This commit is contained in:
2025-11-17 14:28:44 +03:30
parent 5d45f4890c
commit 7ffbacc331
2 changed files with 5 additions and 2 deletions

View File

@@ -24,6 +24,7 @@ def recalculate_remaining_amount(quota):
""" calculate remaining weight from distribution """
total_distributed = quota.distributions_assigned.filter(
parent_distribution__isnull=True,
assigner_organization=quota.registerer_organization,
trash=False,
).aggregate(
total=Sum('weight')