Skip to content

Commit

Permalink
fix: 永久取件失效问题
Browse files Browse the repository at this point in the history
  • Loading branch information
vastsa committed Jan 14, 2024
1 parent 4e9d859 commit 873eac1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/base/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
# 按次数
Expand Down

0 comments on commit 873eac1

Please sign in to comment.