fix - import stat type in orgquotastat

This commit is contained in:
2025-11-17 11:09:25 +03:30
parent 2a34f1093a
commit ed57517af7
5 changed files with 52 additions and 8 deletions

View File

@@ -817,6 +817,10 @@ class OrganizationQuotaStats(BaseModel):
total_distributed = models.PositiveBigIntegerField(default=0)
sold_amount = models.PositiveBigIntegerField(default=0)
remaining_amount = models.PositiveBigIntegerField(default=0) # total - sold
stat_type = models.CharField(max_length=150, choices=(
('distribution', 'DISTRIBUTION'),
('quota', 'QUOTA'),
), default='distribution')
def update_amount(self, main_quota=None):
""" calculate total/sold/remaining """