Login.py: must convert warn to string before comparing to OK

Bug487-WuYuhan-Refactor
Lan Hui 2022-11-03 22:06:24 +08:00
parent f0b5adc5e4
commit 702205940c
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ def signup():
#! 添加如下代码为了过滤注册时的非法字符 #! 添加如下代码为了过滤注册时的非法字符
warn = WarningMessage(username) warn = WarningMessage(username)
if warn != 'OK': if str(warn) != 'OK':
return str(warn) return str(warn)
available = check_username_availability(username) available = check_username_availability(username)