From 702205940cc8962f23b304c55b13ccbb8a0d6639 Mon Sep 17 00:00:00 2001 From: Lan Hui <1348141770@qq.com> Date: Thu, 3 Nov 2022 22:06:24 +0800 Subject: [PATCH] Login.py: must convert warn to string before comparing to OK --- app/account_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/account_service.py b/app/account_service.py index 2d44ec2..2307686 100644 --- a/app/account_service.py +++ b/app/account_service.py @@ -23,7 +23,7 @@ def signup(): #! 添加如下代码为了过滤注册时的非法字符 warn = WarningMessage(username) - if warn != 'OK': + if str(warn) != 'OK': return str(warn) available = check_username_availability(username)