@@ -587,16 +587,20 @@ def import_from_stix2(self, **kwargs):
587587 extras = kwargs .get ("extras" , {})
588588 update = kwargs .get ("update" , False )
589589 if stix_object is not None :
590+ if CustomProperties .NAME in stix_object :
591+ name = stix_object [CustomProperties .NAME ]
592+ elif "abstract" in stix_object :
593+ name = stix_object ["abstract" ]
594+ else :
595+ name = ""
590596 return self .create (
591597 description = self .opencti .stix2 .convert_markdown (stix_object ["abstract" ])
592598 if "abstract" in stix_object
593599 else "" ,
594600 content = self .opencti .stix2 .convert_markdown (stix_object ["content" ])
595601 if "content" in stix_object
596602 else "" ,
597- name = stix_object [CustomProperties .NAME ]
598- if CustomProperties .NAME in stix_object
599- else "" ,
603+ name = name ,
600604 graph_data = stix_object [CustomProperties .GRAPH_DATA ]
601605 if CustomProperties .GRAPH_DATA in stix_object
602606 else "" ,
@@ -647,6 +651,8 @@ def to_stix2(self, **kwargs):
647651 note ["labels" ] = ["note" ]
648652 if self .opencti .not_empty (entity ["description" ]):
649653 note ["abstract" ] = entity ["description" ]
654+ elif self .opencti .not_empty (entity ["name" ]):
655+ note ["abstract" ] = entity ["name" ]
650656 note ["created" ] = self .opencti .stix2 .format_date (entity ["created" ])
651657 note ["modified" ] = self .opencti .stix2 .format_date (entity ["modified" ])
652658 if self .opencti .not_empty (entity ["alias" ]):
0 commit comments