Skip to content
Snippets Groups Projects
Commit fbd35b60 authored by Pavel Antonov's avatar Pavel Antonov :asterisk:
Browse files

Merge branch 'feature/2784-UpdateRequests' into 'master'

Установлены опции для получения всех элементов при установке расширений

See merge request perxis/perxis-go!391
parents 62bcca35 23d3df46
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ import (
"git.perx.ru/perxis/perxis-go/pkg/collections"
"git.perx.ru/perxis/perxis-go/pkg/data"
"git.perx.ru/perxis/perxis-go/pkg/errors"
"git.perx.ru/perxis/perxis-go/pkg/options"
"git.perx.ru/perxis/perxis-go/pkg/setup"
pb "git.perx.ru/perxis/perxis-go/proto/extensions"
"go.uber.org/zap"
......@@ -77,7 +78,7 @@ func (s *storage) GetExtension(ctx context.Context, spaceID, envID string, exten
// FindExtensions возвращает состояния расширений в пространстве
func (s *storage) FindExtensions(ctx context.Context, spaceID, envID string, extensions ...string) ([]*Info, error) {
itms, _, err := s.content.Items.Find(ctx, spaceID, envID, ExtensionsCollection.ID, &items.Filter{ID: extensions})
itms, _, err := s.content.Items.Find(ctx, spaceID, envID, ExtensionsCollection.ID, &items.Filter{ID: extensions}, items.NewFindOptions(options.New(0, 10000)))
if err != nil && !strings.Contains(err.Error(), collections.ErrNotFound.Error()) {
return nil, err
}
......
......@@ -10,6 +10,7 @@ import (
"git.perx.ru/perxis/perxis-go/pkg/collections"
"git.perx.ru/perxis/perxis-go/pkg/errors"
"git.perx.ru/perxis/perxis-go/pkg/items"
"git.perx.ru/perxis/perxis-go/pkg/options"
)
var (
......@@ -323,7 +324,7 @@ func (s *Setup) getItems(ctx context.Context, collID string, confs Items) (map[s
s.EnvironmentID,
collID,
&items.Filter{ID: confs.GetIDs()},
&items.FindOptions{Regular: true, Hidden: true, Templates: true},
&items.FindOptions{Regular: true, Hidden: true, Templates: true, FindOptions: *options.New(0, len(confs))},
)
if err != nil {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment