Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import pprint
import uuid
from abc import abstractmethod
from collections import Counter
from difflib import get_close_matches
from functools import cached_property
from typing import List, Optional, Tuple, Union
Expand Down Expand Up @@ -708,6 +709,15 @@ def mapNamesToSecurityContentObjects(
"an error in the contentctl codebase which must be resolved."
)

# Catch all for finding duplicates in mapped content
if (
len(duplicates := [name for name, count in Counter(v).items() if count > 1])
> 0
):
raise ValueError(
f"Duplicate {cls.__name__} ({duplicates}) found in list: {v}."
)

mappedObjects: list[Self] = []
mistyped_objects: list[SecurityContentObject_Abstract] = []
missing_objects: list[str] = []
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tool.poetry]
name = "contentctl"

version = "5.5.2"
version = "5.5.3"

description = "Splunk Content Control Tool"
authors = ["STRT <research@splunk.com>"]
Expand Down
Loading