This repository was archived by the owner on Dec 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -396,12 +396,15 @@ def __init__(self, opencti):
396396 """
397397
398398 @staticmethod
399- def generate_id (name , context , created ):
399+ def generate_id (name , context , created = None ):
400400 name = name .lower ().strip ()
401401 context = context .lower ().strip ()
402402 if isinstance (created , datetime .datetime ):
403403 created = created .isoformat ()
404- data = {"name" : name , "context" : context , "created" : created }
404+ if created is None :
405+ data = {"name" : name , "context" : context }
406+ else :
407+ data = {"name" : name , "context" : context , "created" : created }
405408 data = canonicalize (data , utf8 = False )
406409 id = str (uuid .uuid5 (uuid .UUID ("00abedb4-aa42-466c-9c01-fed23315a9b7" ), data ))
407410 return "grouping--" + id
Original file line number Diff line number Diff line change @@ -2427,7 +2427,7 @@ def import_item(
24272427 # region Resolve the to
24282428 to_ids = []
24292429 if "x_opencti_where_sighted_refs" in item :
2430- for where_sighted_ref in item ["_opencti_where_sighted_refs " ]:
2430+ for where_sighted_ref in item ["x_opencti_where_sighted_refs " ]:
24312431 to_ids .append (where_sighted_ref )
24322432 elif "where_sighted_refs" in item :
24332433 for where_sighted_ref in item ["where_sighted_refs" ]:
You can’t perform that action at this time.
0 commit comments