Skip to content

Commit a357dd0

Browse files
committed
feat: support system variable
1 parent b181d64 commit a357dd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

backend/apps/system/crud/system_variable.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def list_all(session: SessionDep, trans: Trans, variable: SystemVariable):
4141
SystemVariable.name.asc()).all()
4242
else:
4343
records = session.query(SystemVariable).filter(
44-
and_(SystemVariable.name.like(f'%{variable.name}%'), SystemVariable.type != 'system')).order_by(
44+
and_(SystemVariable.name.ilike(f'%{variable.name}%'), SystemVariable.type != 'system')).order_by(
4545
SystemVariable.type.desc(), SystemVariable.name.asc()).all()
4646

4747
res = []
@@ -62,7 +62,7 @@ async def list_page(session: SessionDep, trans: Trans, pageNum: int, pageSize: i
6262
stmt = select(SystemVariable).order_by(SystemVariable.type.desc(), SystemVariable.name.asc())
6363
else:
6464
stmt = select(SystemVariable).where(
65-
and_(SystemVariable.name.like(f'%{variable.name}%'), SystemVariable.type != 'system')).order_by(
65+
and_(SystemVariable.name.ilike(f'%{variable.name}%'), SystemVariable.type != 'system')).order_by(
6666
SystemVariable.type.desc(), SystemVariable.name.asc())
6767

6868
variable_page = await paginator.get_paginated_response(

0 commit comments

Comments
 (0)