From 3169298f9114146d700f96ce030619100666e879 Mon Sep 17 00:00:00 2001 From: Mojtaba-z Date: Sat, 15 Nov 2025 16:11:46 +0330 Subject: [PATCH] fix - key error at org in quota serializer context --- apps/product/web/api/v1/serializers/quota_serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/product/web/api/v1/serializers/quota_serializers.py b/apps/product/web/api/v1/serializers/quota_serializers.py index db430e3..7521f89 100644 --- a/apps/product/web/api/v1/serializers/quota_serializers.py +++ b/apps/product/web/api/v1/serializers/quota_serializers.py @@ -14,7 +14,7 @@ class QuotaSerializer(serializers.ModelSerializer): representation = super().to_representation(instance) # change quota weight by organization received weight - if self.context['org']: + if 'org' in self.context.keys(): quota_weight_by_org = instance.quota_amount_by_org(self.context['org']) if quota_weight_by_org: representation['quota_weight'] = quota_weight_by_org