fix: 永久取件失效问题

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