Skip to content

Commit

Permalink
[client] Fix marking definition addition in entities (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Hassine committed Feb 14, 2021
1 parent b469030 commit 4217fcd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pycti/entities/opencti_stix_core_relationship.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ def add_marking_definition(self, **kwargs):
"error", "Cannot add Marking-Definition, entity not found"
)
return False
if marking_definition_id in stix_core_relationship["markingDefinitionsIds"]:
if marking_definition_id in stix_core_relationship["objectMarkingIds"]:
return True
else:
self.opencti.log(
Expand Down
2 changes: 1 addition & 1 deletion pycti/entities/opencti_stix_cyber_observable.py
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ def add_marking_definition(self, **kwargs):
"error", "Cannot add Marking-Definition, entity not found"
)
return False
if marking_definition_id in stix_cyber_observable["markingDefinitionsIds"]:
if marking_definition_id in stix_cyber_observable["objectMarkingIds"]:
return True
else:
self.opencti.log(
Expand Down
2 changes: 1 addition & 1 deletion pycti/entities/opencti_stix_domain_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ def add_marking_definition(self, **kwargs):
"error", "Cannot add Marking-Definition, entity not found"
)
return False
if marking_definition_id in stix_domain_object["markingDefinitionsIds"]:
if marking_definition_id in stix_domain_object["objectMarkingIds"]:
return True
else:
self.opencti.log(
Expand Down

0 comments on commit 4217fcd

Please sign in to comment.