This commit is contained in:
yumoqing 2025-08-12 17:42:06 +08:00
parent d077e2cbf5
commit 64c7d400ed

View File

@ -70,13 +70,13 @@ class FileMgr:
quota, expired_date = await self.get_organization_quota(sor,
u.userorgid)
if quota is None:
e = Exception(f'{ownerid} has not quota')
e = Exception(f'{u.userorgid} has not quota')
exception(f'{e}\n{format_exc()}')
raise e
quota_used = await self.get_quota_used(sor, u.userorgid)
if quota_used + filesize / 1000000 >= quota:
self.message = f'{quota=}M, {quota_used=}M {filesize=} overused'
e = Exception(f'{ownerid} quota overflow')
e = Exception(f'{u.userorgid} quota overflow')
exception(f'{e}\n{format_exc()}')
raise e
recs = await sor.R('file',{'hashvalue': hashvalue})