fix: monkey-patch ServerEnv class so get_module_dbname works for all instances

This commit is contained in:
yumoqing 2026-08-11 16:28:40 +08:00
parent dd11ce3a30
commit 9a0fe11ed2

View File

@ -28,6 +28,9 @@ def init():
env = ServerEnv()
env.get_module_dbname = get_module_dbname
env.password_encode = password_encode
# monkey-patch ServerEnv class so ALL instances get these methods
ServerEnv.get_module_dbname = staticmethod(get_module_dbname)
ServerEnv.password_encode = staticmethod(password_encode)
load_appbase()
load_rbac()