Skip to content

Commit d45191a

Browse files
author
Samuel Hassine
committedSep 3, 2021
[client] Adapt example to new update attribute syntax
1 parent 5eb9ccb commit d45191a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed
 

‎examples/update_entity_attribute.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616

1717
# Update the description
1818
opencti_api_client.stix_domain_object.update_field(
19-
id=intrusion_set["id"], key="description", value="This is APT28!"
19+
id=intrusion_set["id"], input={"key": "description", "value": "This is APT28!"}
2020
)

‎pycti/entities/opencti_stix_cyber_observable.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1269,7 +1269,7 @@ def update_field(self, **kwargs):
12691269
else:
12701270
self.opencti.log(
12711271
"error",
1272-
"[opencti_stix_cyber_observable_update_field] Missing parameters: id and key and value",
1272+
"[opencti_stix_cyber_observable_update_field] Missing parameters: id and input",
12731273
)
12741274
return None
12751275

‎pycti/entities/opencti_stix_domain_object.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ def update_field(self, **kwargs):
603603
else:
604604
self.opencti.log(
605605
"error",
606-
"[opencti_stix_domain_object] Missing parameters: id and key and value",
606+
"[opencti_stix_domain_object] Missing parameters: id and input",
607607
)
608608
return None
609609

0 commit comments

Comments
 (0)