From 6d29ae00c48433f12bb138110e8aa702e86a66f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=9D=E5=A1=94Linux=E5=BC=80=E5=8F=91=20-=20=E9=98=BF?= =?UTF-8?q?=E8=89=AF?= <287962566@qq.com> Date: Wed, 30 Mar 2022 18:06:46 +0800 Subject: [PATCH] =?UTF-8?q?sid=3D'0'=E6=97=B6=E8=8E=B7=E5=8F=96=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=BA=93=E5=AF=B9=E8=B1=A1=E5=87=BA=E9=94=99=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/public.py | 1 + 1 file changed, 1 insertion(+) diff --git a/class/public.py b/class/public.py index 9a50108c..6d32604f 100644 --- a/class/public.py +++ b/class/public.py @@ -1752,6 +1752,7 @@ def get_mysql_obj(db_name): # 取mysql数据库对像 By sid def get_mysql_obj_by_sid(sid = 0,conn_config = None): + if sid in ['0','']: sid = 0 if sid: if not conn_config: conn_config = M('database_servers').where("id=?" ,sid).find() import db_mysql