fix: support substring search on workspace name (#2096)

This commit is contained in:
Garrett Delfosse
2022-06-06 14:43:16 -05:00
committed by GitHub
parent 66cf59bbe1
commit a860b86256
4 changed files with 41 additions and 5 deletions

View File

@ -330,7 +330,7 @@ func (q *fakeQuerier) GetWorkspacesWithFilter(_ context.Context, arg database.Ge
if !arg.Deleted && workspace.Deleted {
continue
}
if arg.Name != "" && workspace.Name != arg.Name {
if arg.Name != "" && !strings.Contains(workspace.Name, arg.Name) {
continue
}
workspaces = append(workspaces, workspace)