diff --git a/apps/product/models.py b/apps/product/models.py index 84ebfbc..7921261 100644 --- a/apps/product/models.py +++ b/apps/product/models.py @@ -445,8 +445,9 @@ class Quota(BaseModel): """ check if quota allowed time for distribute, sale and... is expired """ now = datetime.now() persian_date = jdatetime.datetime.fromgregorian(datetime=now) - - return persian_date.month in self.distribution_mode + if self.has_distribution_limit: + return persian_date.month in self.distribution_mode + return True def is_in_sale_licence_time(self): """ check if quota allowed time for sale and... is expired """ diff --git a/logs/django_requests.log b/logs/django_requests.log index efb8773..fcb5ac0 100644 --- a/logs/django_requests.log +++ b/logs/django_requests.log @@ -662,3 +662,5 @@ AssertionError: .validate() should return the validated data [2025-11-02 11:03:32,109] INFO django.server | IP: - | Path: - | "GET /auth/api/v1/organization/child_organizations/ HTTP/1.1" 200 67 [2025-11-02 11:04:44,440] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\authentication\api\v1\api.py changed, reloading. [2025-11-02 11:04:48,112] INFO django.utils.autoreload | IP: - | Path: - | Watching for file changes with StatReloader +[2025-11-02 11:05:16,197] INFO django.server | IP: - | Path: - | "GET /auth/api/v1/organization/child_organizations/ HTTP/1.1" 200 6938 +[2025-11-02 11:33:14,043] INFO django.utils.autoreload | IP: - | Path: - | D:\Project\Rasaddam_Backend\apps\product\models.py changed, reloading.