@@ -63,8 +63,6 @@ def list(self, **kwargs):
6363 get_all = kwargs .get ("getAll" , False )
6464 with_pagination = kwargs .get ("withPagination" , False )
6565 with_files = kwargs .get ("withFiles" , False )
66- if get_all :
67- first = 100
6866
6967 self .opencti .app_logger .info (
7068 "Listing Indicators with filters" , {"filters" : json .dumps (filters )}
@@ -366,43 +364,43 @@ def import_from_stix2(self, **kwargs):
366364 if stix_object is not None :
367365 # Search in extensions
368366 if "x_opencti_score" not in stix_object :
369- stix_object ["x_opencti_score" ] = (
370- self . opencti . get_attribute_in_extension ( "score" , stix_object )
371- )
367+ stix_object [
368+ "x_opencti_score"
369+ ] = self . opencti . get_attribute_in_extension ( "score" , stix_object )
372370 if "x_opencti_detection" not in stix_object :
373- stix_object ["x_opencti_detection" ] = (
374- self . opencti . get_attribute_in_extension ( "detection" , stix_object )
375- )
371+ stix_object [
372+ "x_opencti_detection"
373+ ] = self . opencti . get_attribute_in_extension ( "detection" , stix_object )
376374 if (
377375 "x_opencti_main_observable_type" not in stix_object
378376 and self .opencti .get_attribute_in_extension (
379377 "main_observable_type" , stix_object
380378 )
381379 is not None
382380 ):
383- stix_object ["x_opencti_main_observable_type" ] = (
384- self . opencti . get_attribute_in_extension (
385- "main_observable_type" , stix_object
386- )
381+ stix_object [
382+ "x_opencti_main_observable_type"
383+ ] = self . opencti . get_attribute_in_extension (
384+ "main_observable_type" , stix_object
387385 )
388386 if "x_opencti_create_observables" not in stix_object :
389- stix_object ["x_opencti_create_observables" ] = (
390- self . opencti . get_attribute_in_extension (
391- "create_observables" , stix_object
392- )
387+ stix_object [
388+ "x_opencti_create_observables"
389+ ] = self . opencti . get_attribute_in_extension (
390+ "create_observables" , stix_object
393391 )
394392 if "x_opencti_stix_ids" not in stix_object :
395- stix_object ["x_opencti_stix_ids" ] = (
396- self . opencti . get_attribute_in_extension ( "stix_ids" , stix_object )
397- )
393+ stix_object [
394+ "x_opencti_stix_ids"
395+ ] = self . opencti . get_attribute_in_extension ( "stix_ids" , stix_object )
398396 if "x_opencti_granted_refs" not in stix_object :
399- stix_object ["x_opencti_granted_refs" ] = (
400- self . opencti . get_attribute_in_extension ( "granted_refs" , stix_object )
401- )
397+ stix_object [
398+ "x_opencti_granted_refs"
399+ ] = self . opencti . get_attribute_in_extension ( "granted_refs" , stix_object )
402400 if "x_opencti_workflow_id" not in stix_object :
403- stix_object ["x_opencti_workflow_id" ] = (
404- self . opencti . get_attribute_in_extension ( "workflow_id" , stix_object )
405- )
401+ stix_object [
402+ "x_opencti_workflow_id"
403+ ] = self . opencti . get_attribute_in_extension ( "workflow_id" , stix_object )
406404
407405 return self .create (
408406 stix_id = stix_object ["id" ],
0 commit comments