From 9544b7773af84d0f885cabd5bc45e042073c6c71 Mon Sep 17 00:00:00 2001 From: shikong <919411476@qq.com> Date: Wed, 31 May 2023 13:32:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8=20fastapi=20=E9=87=8D?= =?UTF-8?q?=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- handler/car.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handler/car.py b/handler/car.py index 1f35374..60f1374 100644 --- a/handler/car.py +++ b/handler/car.py @@ -22,8 +22,8 @@ def get_list(db: Session = Depends(database), query = db.query(JiaKaoBaoDian) if len(keyword) > 0: query = query.filter( - JiaKaoBaoDian.question.like("%%%s%%" % keyword), - JiaKaoBaoDian.illiteracy_explain.like("%%%s%%" % keyword),) + JiaKaoBaoDian.question.like("%%%s%%" % keyword) | + JiaKaoBaoDian.illiteracy_explain.like("%%%s%%" % keyword)) if order_by_wrong_rate: query = query.order_by(JiaKaoBaoDian.wrong_rate.desc())