Skip to content

Commit cf3d932

Browse files
committed
mapping sort
1 parent 30da9af commit cf3d932

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

uncoder-core/app/translator/core/models/query_container.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,22 @@ def __init__(
6969
self.raw_mitre_attack = raw_mitre_attack or []
7070
self.status = status or "stable"
7171
self.false_positives = false_positives or []
72-
self.source_mapping_ids = sorted(source_mapping_ids) if source_mapping_ids else [DEFAULT_MAPPING_NAME]
72+
self._source_mapping_ids = source_mapping_ids or [DEFAULT_MAPPING_NAME]
7373
self.parsed_logsources = parsed_logsources or {}
7474
self.timeframe = timeframe
7575

7676
@property
7777
def author_str(self) -> str:
7878
return ", ".join(self.author)
7979

80+
@property
81+
def source_mapping_ids(self) -> list[str]:
82+
return sorted(self._source_mapping_ids)
83+
84+
@source_mapping_ids.setter
85+
def source_mapping_ids(self, source_mapping_ids: list[str]) -> None:
86+
self._source_mapping_ids = source_mapping_ids
87+
8088

8189
@dataclass
8290
class RawQueryContainer:

0 commit comments

Comments
 (0)