From 6ebd4386d012ffed314ccdac939b8ad68c020245 Mon Sep 17 00:00:00 2001 From: "apan_youxiang@163.com" Date: Thu, 8 Sep 2022 15:17:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=95=E5=89=82=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db_logic/medicament.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db_logic/medicament.py b/db_logic/medicament.py index 4aa1853..7814a8f 100644 --- a/db_logic/medicament.py +++ b/db_logic/medicament.py @@ -112,6 +112,8 @@ class BllMedicament(Repository): if filter_base: filter_base += " and " filter_base += f" `name` like '{seach_word}' or english_name like '{seach_word}' " + if filter_base: + filter_base = f" where {filter_base}" sql_all = f""" select * from rms_medicament {filter_base} order by put_in_date desc """