Skip to content
Snippets Groups Projects
Commit ab5108f2 authored by ko_oler's avatar ko_oler
Browse files

правки по ПР: ключ "extension" вынесен в переменную

parent 3d2d5439
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,7 @@ var ( ...@@ -16,6 +16,7 @@ var (
ErrInstallCollections = errors.New("failed to install collections") ErrInstallCollections = errors.New("failed to install collections")
ErrUninstallCollections = errors.New("failed to uninstall collections") ErrUninstallCollections = errors.New("failed to uninstall collections")
ErrCollectionAlreadyExists = errors.New("failed to uninstall collections") ErrCollectionAlreadyExists = errors.New("failed to uninstall collections")
key = "extension"
) )
type CollectionsOption func(c *CollectionConfig) type CollectionsOption func(c *CollectionConfig)
...@@ -157,7 +158,7 @@ func (s *Setup) InstallCollection(ctx context.Context, c CollectionConfig) (setS ...@@ -157,7 +158,7 @@ func (s *Setup) InstallCollection(ctx context.Context, c CollectionConfig) (setS
return false, err return false, err
} }
} else { } else {
if collection.Schema.Metadata != nil && exist.Schema.Metadata["extension"] != collection.Schema.Metadata["extension"] && !s.IsForce() { if collection.Schema.Metadata != nil && exist.Schema.Metadata[key] != collection.Schema.Metadata[key] && !s.IsForce() {
return false, ErrCollectionAlreadyExists return false, ErrCollectionAlreadyExists
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment