add - org quota stat to inventory_entry / inventory_balance to org_quota_stat

This commit is contained in:
2025-11-19 16:49:00 +03:30
parent f633e24d90
commit 386008b309
6 changed files with 50 additions and 0 deletions

View File

@@ -29,6 +29,9 @@ class QuotaSerializer(serializers.ModelSerializer):
org = self.context['org']
quota_weight_by_org = instance.quota_amount_by_org(org)
if quota_weight_by_org:
# organization quota stat record
representation['org_quota_stat'] = quota_weight_by_org['id']
representation['quota_weight'] = quota_weight_by_org['quota_weight']
representation['quota_distributed'] = quota_weight_by_org['quota_distributed']
representation['remaining_weight'] = quota_weight_by_org['remaining_weight']