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

Commit 4217fcd

Browse files
author
Samuel Hassine
committed
[client] Fix marking definition addition in entities (#140)
1 parent b469030 commit 4217fcd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pycti/entities/opencti_stix_core_relationship.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ def add_marking_definition(self, **kwargs):
589589
"error", "Cannot add Marking-Definition, entity not found"
590590
)
591591
return False
592-
if marking_definition_id in stix_core_relationship["markingDefinitionsIds"]:
592+
if marking_definition_id in stix_core_relationship["objectMarkingIds"]:
593593
return True
594594
else:
595595
self.opencti.log(

pycti/entities/opencti_stix_cyber_observable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ def add_marking_definition(self, **kwargs):
12501250
"error", "Cannot add Marking-Definition, entity not found"
12511251
)
12521252
return False
1253-
if marking_definition_id in stix_cyber_observable["markingDefinitionsIds"]:
1253+
if marking_definition_id in stix_cyber_observable["objectMarkingIds"]:
12541254
return True
12551255
else:
12561256
self.opencti.log(

pycti/entities/opencti_stix_domain_object.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ def add_marking_definition(self, **kwargs):
839839
"error", "Cannot add Marking-Definition, entity not found"
840840
)
841841
return False
842-
if marking_definition_id in stix_domain_object["markingDefinitionsIds"]:
842+
if marking_definition_id in stix_domain_object["objectMarkingIds"]:
843843
return True
844844
else:
845845
self.opencti.log(

0 commit comments

Comments
 (0)