From 897e54cb8667b53c3af4a36b335a71f4bf8eb00a Mon Sep 17 00:00:00 2001 From: dami Date: Wed, 9 Apr 2025 11:41:01 +0800 Subject: [PATCH] Update pg.py --- plugins/postgresql/class/pg.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/postgresql/class/pg.py b/plugins/postgresql/class/pg.py index 4c0f7a127..0bf3b5bef 100755 --- a/plugins/postgresql/class/pg.py +++ b/plugins/postgresql/class/pg.py @@ -7,8 +7,12 @@ import sys import psycopg2 -sys.path.append(os.getcwd() + "/class/core") -import mw +web_dir = os.getcwd() + "/web" +if os.path.exists(web_dir): + sys.path.append(web_dir) + os.chdir(web_dir) + +import core.mw as mw class ORM: