Add serial_number to search bar query

This commit is contained in:
2026-05-22 18:07:42 -04:00
parent dec6a90409
commit 35ccebb0f0
+2 -2
View File
@@ -962,9 +962,9 @@ def list_assets(
conditions.append("assigned_to = ?")
params.append(assigned_to)
if q:
conditions.append("(name LIKE ? OR machine_id LIKE ? OR description LIKE ?)")
conditions.append("(name LIKE ? OR machine_id LIKE ? OR serial_number LIKE ? OR description LIKE ?)")
like = f"%{q}%"
params.extend([like, like, like])
params.extend([like, like, like, like])
where = " AND ".join(conditions)
sql = "SELECT * FROM assets"