From ab5108f24417ce097fdfedd0ac9d9429e9165329 Mon Sep 17 00:00:00 2001 From: ko_oler <kooler89@gmail.com> Date: Fri, 7 Jul 2023 17:31:31 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D0=BF?= =?UTF-8?q?=D0=BE=20=D0=9F=D0=A0:=20=D0=BA=D0=BB=D1=8E=D1=87=20"extension"?= =?UTF-8?q?=20=D0=B2=D1=8B=D0=BD=D0=B5=D1=81=D0=B5=D0=BD=20=D0=B2=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D1=83=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/setup/collection.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/setup/collection.go b/pkg/setup/collection.go index 008fb711..375fedf6 100644 --- a/pkg/setup/collection.go +++ b/pkg/setup/collection.go @@ -16,6 +16,7 @@ var ( ErrInstallCollections = errors.New("failed to install collections") ErrUninstallCollections = errors.New("failed to uninstall collections") ErrCollectionAlreadyExists = errors.New("failed to uninstall collections") + key = "extension" ) type CollectionsOption func(c *CollectionConfig) @@ -157,7 +158,7 @@ func (s *Setup) InstallCollection(ctx context.Context, c CollectionConfig) (setS return false, err } } 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 } -- GitLab