From 97570b285c10ff65924670c352da5e3a7f378700 Mon Sep 17 00:00:00 2001 From: Mojtaba-z Date: Sun, 2 Nov 2025 15:35:44 +0330 Subject: [PATCH] fix - distribution description required --- apps/core/visibility_registry.py | 2 ++ .../web/api/v1/serializers/quota_distribution_serializers.py | 3 +++ logs/django_requests.log | 3 +++ 3 files changed, 8 insertions(+) diff --git a/apps/core/visibility_registry.py b/apps/core/visibility_registry.py index 47feeea..4cac976 100644 --- a/apps/core/visibility_registry.py +++ b/apps/core/visibility_registry.py @@ -2,10 +2,12 @@ VISIBILITY_MAP = { 'userrelations': 'organization', 'organization': 'id', 'quota': ['registerer_organization', 'assigned_organizations'], + 'quotastats': ['quota__registerer_organization', 'quota__assigned_organizations'], 'quotadistribution': ['assigner_organization', 'assigned_organization'], 'inventoryentry': 'organization', 'inventoryquotasaletransaction': 'organization', 'device': 'organization', + # 'deviceactivationcode': 'organization', # 'deviceversion': 'organization', # 'posclient': 'organization', diff --git a/apps/product/web/api/v1/serializers/quota_distribution_serializers.py b/apps/product/web/api/v1/serializers/quota_distribution_serializers.py index 69f169c..47a7de0 100644 --- a/apps/product/web/api/v1/serializers/quota_distribution_serializers.py +++ b/apps/product/web/api/v1/serializers/quota_distribution_serializers.py @@ -19,6 +19,9 @@ class QuotaDistributionSerializer(serializers.ModelSerializer): extra_kwargs = { 'assigner_organization': { 'required': False + }, + 'description': { + 'required': False } } diff --git a/logs/django_requests.log b/logs/django_requests.log index 00cb1e1..1eadbc8 100644 --- a/logs/django_requests.log +++ b/logs/django_requests.log @@ -685,3 +685,6 @@ AssertionError: .validate() should return the validated data [2025-11-02 14:48:23,704] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader [2025-11-02 14:49:21,133] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\services\visibility_services.py changed, reloading. [2025-11-02 14:49:23,410] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader +[2025-11-02 15:01:55,002] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\core\visibility_registry.py changed, reloading. +[2025-11-02 15:01:59,909] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader +[2025-11-02 15:33:11,579] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\product\web\api\v1\serializers\quota_distribution_serializers.py changed, reloading.