Skip to content

Commit

Permalink
Merge pull request #154 from diogomatoschaves/discount-deleted-pipelines
Browse files Browse the repository at this point in the history
Only check existing name of non-deleted pipelines
  • Loading branch information
diogomatoschaves authored Feb 21, 2024
2 parents b22044b + 36b090a commit 332c145
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion data/service/helpers/_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,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')
Expand Down

0 comments on commit 332c145

Please sign in to comment.