From 873eac1aa32a66445267ddc835dff7baaf038c76 Mon Sep 17 00:00:00 2001 From: lan Date: Sun, 14 Jan 2024 13:30:18 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B0=B8=E4=B9=85=E5=8F=96=E4=BB=B6?= =?UTF-8?q?=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/base/models.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/base/models.py b/apps/base/models.py index ad08c7974..2c2b769f7 100644 --- a/apps/base/models.py +++ b/apps/base/models.py @@ -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() # 按次数