Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit b3abafb

Browse files
author
Samuel Hassine
committed
Fix getting aliases
1 parent 4096ef0 commit b3abafb

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pycti/api/opencti_api_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,8 +2376,7 @@ def create_vulnerability(self, name, description, alias=None, id=None, stix_id_k
23762376
return result['data']['vulnerabilityAdd']
23772377

23782378
def create_vulnerability_if_not_exists(self, name, description, alias=None, id=None, stix_id_key=None, created=None,
2379-
modified=None,
2380-
update=False):
2379+
modified=None, update=False):
23812380
object_result = self.check_existing_stix_domain_entity(stix_id_key, name, 'Vulnerability')
23822381
if object_result is not None:
23832382
if update:

pycti/utils/opencti_stix2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def pick_aliases(self, stix_object):
6767
elif 'x_mitre_aliases' in stix_object:
6868
return stix_object['x_mitre_aliases']
6969
elif 'aliases' in stix_object:
70-
return stix_object['alias']
70+
return stix_object['aliases']
7171
return None
7272

7373
def prepare_export(self, entity, stix_object, mode='simple'):

0 commit comments

Comments
 (0)