Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit ff21233

Browse files
[client] Remove Administrative Area specific handling (#314)
1 parent 9aa3589 commit ff21233

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

pycti/entities/opencti_location.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -342,18 +342,9 @@ def import_from_stix2(self, **kwargs):
342342
self.opencti.log("error", "[opencti_location] Missing name")
343343
return
344344
if "x_opencti_location_type" in stix_object:
345-
if stix_object["x_opencti_location_type"] == "Administrative-Area":
346-
type = "AdministrativeArea"
347-
else:
348-
type = stix_object["x_opencti_location_type"]
345+
type = stix_object["x_opencti_location_type"]
349346
elif self.opencti.get_attribute_in_extension("type", stix_object) is not None:
350-
if (
351-
self.opencti.get_attribute_in_extension("type", stix_object)
352-
== "Administrative-Area"
353-
):
354-
type = "AdministrativeArea"
355-
else:
356-
type = self.opencti.get_attribute_in_extension("type", stix_object)
347+
type = self.opencti.get_attribute_in_extension("type", stix_object)
357348
else:
358349
if "city" in stix_object:
359350
type = "City"
@@ -364,7 +355,6 @@ def import_from_stix2(self, **kwargs):
364355
else:
365356
type = "Position"
366357
if stix_object is not None:
367-
368358
# Search in extensions
369359
if "x_opencti_aliases" not in stix_object:
370360
stix_object[

0 commit comments

Comments
 (0)