add - new pricing attr system
This commit is contained in:
@@ -32,12 +32,14 @@ class QuotaStatsValidator:
|
||||
"""
|
||||
if organization has enough remaining weight
|
||||
"""
|
||||
if assigner_org.type.key == "ADM":
|
||||
assigner_org = quota.registerer_organization
|
||||
|
||||
stat = QuotaStatsValidator._get_stat(quota, assigner_org)
|
||||
if not stat:
|
||||
raise DistributionException(
|
||||
f"سازمان {assigner_org.name} هیچ مدل میانی برای این سهمیه {quota} ندارد .", # noqa
|
||||
status.HTTP_403_FORBIDDEN
|
||||
)
|
||||
status.HTTP_403_FORBIDDEN)
|
||||
|
||||
remaining = getattr(stat, "remaining_amount", None)
|
||||
if remaining is None:
|
||||
|
||||
Reference in New Issue
Block a user