Skip to content

Commit caa38bf

Browse files
fit2cloud-chenywXiaJunjie2020
authored andcommitted
fix: Advanced Assistant: Dynamic Data Source with Case-Insensitive Type Handling
1 parent e679785 commit caa38bf

File tree

5 files changed

+91
-80
lines changed

5 files changed

+91
-80
lines changed

backend/apps/db/constant.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
from enum import Enum
55

6+
from common.utils.utils import equals_ignore_case
7+
68

79
class ConnectType(Enum):
810
sqlalchemy = ('sqlalchemy')
@@ -37,7 +39,8 @@ def __init__(self, type, db_name, prefix, suffix, connect_type: ConnectType, tem
3739
@classmethod
3840
def get_db(cls, type, default_if_none=False):
3941
for db in cls:
40-
if db.type == type:
42+
""" if db.type == type: """
43+
if equals_ignore_case(db.type, type):
4144
return db
4245
if default_if_none:
4346
return DB.pg

0 commit comments

Comments
 (0)