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