From 23e779ed94906303a475e51b5018caaa57589c12 Mon Sep 17 00:00:00 2001 From: InfinityPacer <160988576+InfinityPacer@users.noreply.github.com> Date: Mon, 13 Jan 2025 02:02:08 +0800 Subject: [PATCH] fix(site): handle NoneType for userdata.user_level in regex search --- app/chain/site.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/chain/site.py b/app/chain/site.py index c4e0c813..cedaf657 100644 --- a/app/chain/site.py +++ b/app/chain/site.py @@ -89,7 +89,7 @@ class SiteChain(ChainBase): )) # 低分享率警告 if userdata.ratio and float(userdata.ratio) < 1 and not bool( - re.search(r"(贵宾|VIP?)", userdata.user_level, re.IGNORECASE)): + re.search(r"(贵宾|VIP?)", userdata.user_level or "", re.IGNORECASE)): self.post_message(Notification( mtype=NotificationType.SiteMessage, title=f"【站点分享率低预警】",