From 523f86c2e078adfd202ce47d36f6cbf45b8b004c Mon Sep 17 00:00:00 2001
From: ko_oler <kooler89@gmail.com>
Date: Tue, 11 Jul 2023 18:19:18 +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?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 pkg/setup/collection.go | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pkg/setup/collection.go b/pkg/setup/collection.go
index 4cb6b094..f7869c3c 100644
--- a/pkg/setup/collection.go
+++ b/pkg/setup/collection.go
@@ -225,8 +225,8 @@ func (s *Setup) UninstallCollections(ctx context.Context) error {
 }
 
 func (s *Setup) UninstallCollection(ctx context.Context, c CollectionConfig) error {
-	if ok, _ := c.DeleteFn(s, c.collection); ok {
-		if err := s.content.Collections.Delete(ctx, s.SpaceID, s.EnvironmentID, c.collection.ID); err != nil && !strings.Contains(err.Error(), collections.ErrNotFound.Error()) {
+	if ok, err := c.DeleteFn(s, c.collection); ok && err != nil {
+		if err = s.content.Collections.Delete(ctx, s.SpaceID, s.EnvironmentID, c.collection.ID); err != nil && !strings.Contains(err.Error(), collections.ErrNotFound.Error()) {
 			return err
 		}
 		s.removeItems(c.collection.ID) // после удаления коллекции нет смысла удалять ее элементы
-- 
GitLab