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