From 376dc649df68df57869e5f5a02d0cd263254bbde Mon Sep 17 00:00:00 2001 From: Michael Rasmussen Date: Mon, 15 Apr 2024 18:53:20 +0200 Subject: [PATCH 1/1] Clean up code --- db.py | 2 -- searchwindow.py | 4 ---- 2 files changed, 6 deletions(-) diff --git a/db.py b/db.py index b285ff2..0fa2839 100644 --- a/db.py +++ b/db.py @@ -113,7 +113,6 @@ class DB: lensmaker = cur.fetchone() else: lensmaker = (maker, ) - #cur.execute("select sn, description, notes, id from lens where maker = ?", lensmaker) cur.execute(sql, lensmaker) rows = cur. fetchall() return rows @@ -130,7 +129,6 @@ class DB: lensmaker = cur.fetchone() else: lensmaker = (maker, ) - #cur.execute("select sn, description, notes, id from lens where description like ? and maker = ? COLLATE NOCASE", ('%'+pattern+'%', ) + lensmaker) cur.execute(sql, ('%'+pattern+'%', ) + lensmaker) rows = cur. fetchall() return rows diff --git a/searchwindow.py b/searchwindow.py index 6ef2785..d2e8e72 100644 --- a/searchwindow.py +++ b/searchwindow.py @@ -40,10 +40,6 @@ class SearchResultDialog(): self.liststore.append(row) def emptyString(self, str): -# if not(str and not str.strip()): -# return True -# else: -# return False return not (str and str.strip()) def on_ok_btn_clicked(self, button): -- 2.39.5