Skip to content

Commit

Permalink
fix: updated element mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
jerlendds committed May 14, 2023
1 parent 210c478 commit 2aee451
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/osintbuddy/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __init__(self):
]

def __call__(self):
return self.node_blueprint()
return self.blueprint()

@staticmethod
def _map_node_elements(element, kwargs):
Expand All @@ -137,7 +137,7 @@ def _map_node_elements(element, kwargs):
return element

@classmethod
def node_blueprint(cls, **kwargs):
def blueprint(cls, **kwargs):
"""
Generate and return a dictionary representing the plugins node.
Includes label, name, color, icon, and a list of all elements
Expand All @@ -151,11 +151,11 @@ def node_blueprint(cls, **kwargs):
node['elements'] = []
for element in cls.node:
if type(element) is list:
e = []
for elm in element:
node['elements'].append(cls._map_node_elements(elm.json(), kwargs))
e.append(cls._map_node_elements(elm.json(), kwargs))
node['elements'].append(e)
else:
print('element: ', element.json(), to_snake_case(element.json()['label']))
print('kwargs: ', kwargs, '\n\n')
e = cls._map_node_elements(element.json(), kwargs)
node['elements'].append(e)
return node
Expand Down

0 comments on commit 2aee451

Please sign in to comment.