Add serial_number to search bar query
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user