From 36b090a467575f3fb14659b62ebb669cea234527 Mon Sep 17 00:00:00 2001 From: Diogo Matos Chaves Date: Wed, 21 Feb 2024 20:44:40 -0300 Subject: [PATCH] Only check existing name of non-deleted pipelines --- data/service/helpers/_helpers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/service/helpers/_helpers.py b/data/service/helpers/_helpers.py index 1eb2828f..e1c7e6f6 100644 --- a/data/service/helpers/_helpers.py +++ b/data/service/helpers/_helpers.py @@ -110,7 +110,9 @@ def check_input(strategies, edit_pipeline=False, **kwargs): name = kwargs.get('name') if name is None: raise NameRequired - if not isinstance(name, str) or Pipeline.objects.exclude(id=pipeline_id).filter(name=name).exists(): + if (not isinstance(name, str) or Pipeline.objects.exclude(id=pipeline_id, deleted=True) + .filter(name=name).exists()): + raise NameInvalid(name) color = kwargs.get('color')