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 """