From b6513c22892ab0854fdd80b49897196af4295f63 Mon Sep 17 00:00:00 2001 From: Daniel Gospodinow Date: Tue, 20 Jul 2021 15:44:26 +0300 Subject: [PATCH] Replace label repo deleteOne with deleteMany (#1958) * Replace label repo deleteOne with deleteMany * Bump director version --- chart/compass/values.yaml | 2 +- components/director/internal/domain/label/repository.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chart/compass/values.yaml b/chart/compass/values.yaml index 44fb3a9527..e4b9e8417a 100644 --- a/chart/compass/values.yaml +++ b/chart/compass/values.yaml @@ -75,7 +75,7 @@ global: version: "PR-1910" director: dir: - version: "PR-1952" + version: "PR-1958" gateway: dir: version: "PR-1910" diff --git a/components/director/internal/domain/label/repository.go b/components/director/internal/domain/label/repository.go index 28365388c3..5557b3153c 100644 --- a/components/director/internal/domain/label/repository.go +++ b/components/director/internal/domain/label/repository.go @@ -114,7 +114,7 @@ func (r *repository) ListByKey(ctx context.Context, tenant, key string) ([]*mode } func (r *repository) Delete(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string, key string) error { - return r.deleter.DeleteOne(ctx, tenant, repo.Conditions{repo.NewEqualCondition("key", key), repo.NewEqualCondition(labelableObjectField(objectType), objectID)}) + return r.deleter.DeleteMany(ctx, tenant, repo.Conditions{repo.NewEqualCondition("key", key), repo.NewEqualCondition(labelableObjectField(objectType), objectID)}) } func (r *repository) DeleteAll(ctx context.Context, tenant string, objectType model.LabelableObject, objectID string) error {