apiserver/folders: use exact match on GetFolderByTitle in legacy (#106867)
* apiserver/folders: use exact match on GetFolderByTitle in legacy Signed-off-by: Maicon Costa <maiconscosta@gmail.com> --------- Signed-off-by: Maicon Costa <maiconscosta@gmail.com>
This commit is contained in:
@@ -310,11 +310,16 @@ func (s *Service) getFolderByTitleFromApiServer(ctx context.Context, orgID int64
|
||||
|
||||
request := &resourcepb.ResourceSearchRequest{
|
||||
Options: &resourcepb.ListOptions{
|
||||
Key: folderkey,
|
||||
Fields: []*resourcepb.Requirement{},
|
||||
Key: folderkey,
|
||||
Fields: []*resourcepb.Requirement{
|
||||
{
|
||||
Key: resource.SEARCH_FIELD_TITLE_PHRASE, // nolint:staticcheck
|
||||
Operator: string(selection.Equals),
|
||||
Values: []string{title},
|
||||
},
|
||||
},
|
||||
Labels: []*resourcepb.Requirement{},
|
||||
},
|
||||
Query: title,
|
||||
Limit: folderSearchLimit}
|
||||
|
||||
if parentUID != nil {
|
||||
|
||||
Reference in New Issue
Block a user