Skip to content

Commit

Permalink
fix(layout): Updated get_external_id method to use a different name t…
Browse files Browse the repository at this point in the history
…han object as its parameter
  • Loading branch information
MSAdministrator committed Aug 25, 2022
1 parent f9b3a94 commit 30ae9b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyattck/utils/layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,17 +142,17 @@ def make_layout(self) -> Layout:
)
return layout

def _get_external_id(self, object) -> str:
def _get_external_id(self, attck_object) -> str:
"""Retrieves the official MITRE ID from an objects external references.
Args:
object (Any): A MITRE ATTCK object type.
attck_object (Any): A MITRE ATTCK object type.
Returns:
str: The official designated MITRE ATT&CK ID.
"""
if hasattr(object, "external_references"):
for item in getattr(object, "external_references"):
if hasattr(attck_object, "external_references"):
for item in getattr(attck_object, "external_references"):
if (
hasattr(item, "external_id")
and getattr(item, "external_id")
Expand Down

0 comments on commit 30ae9b9

Please sign in to comment.