fix: 永久取件失效问题

This commit is contained in:
lan
2024-01-14 13:30:18 +08:00
parent 4e9d859ab0
commit 873eac1aa3
+2
View File
@@ -29,6 +29,8 @@ class FileCodes(Model):
async def is_expired(self):
# 按时间
if self.expired_at is None:
return False
if self.expired_at and self.expired_count < 0:
return self.expired_at < await get_now()
# 按次数