fix: add username search support to workspace and admin pages (#20780)
This fix restores and extends the username/email search functionality across workspace pages that was originally added in PR #14002. The issue was that: 1. The backend search functions for Models and Knowledge only searched `User.name` and `User.email`, but not `User.username` 2. The Functions admin page lacked user search entirely Changes made: Added User.username to backend search conditions for Models and Knowledge pages Added complete user search (name, email, username) to the Functions admin page client-side filter
This commit is contained in:
@@ -229,6 +229,9 @@ class KnowledgeTable:
|
||||
or_(
|
||||
Knowledge.name.ilike(f"%{query_key}%"),
|
||||
Knowledge.description.ilike(f"%{query_key}%"),
|
||||
User.name.ilike(f"%{query_key}%"),
|
||||
User.email.ilike(f"%{query_key}%"),
|
||||
User.username.ilike(f"%{query_key}%"),
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user