fix - distrbution model in quota

This commit is contained in:
2025-11-02 11:33:38 +03:30
parent 19e0c29f02
commit bf72eaad17
2 changed files with 5 additions and 2 deletions

View File

@@ -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)
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 """

View File

@@ -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.