fix - return none on get stat on quota

This commit is contained in:
2025-12-03 09:27:35 +03:30
parent ff8b3e2ab4
commit 782649e487
2 changed files with 6 additions and 2 deletions

View File

@@ -544,7 +544,11 @@ class Quota(BaseModel):
org = self.registerer_organization
stat = OrganizationQuotaStats.objects.filter(
quota=self,
organization=org
)
# first quota created is none stat on attribute & broker value table
if stat.stat_type == 'quota':
return None
return stat.first() if stat.exists() else None
def soft_delete(self):