Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinelliott committed Jul 18, 2024
1 parent 7557808 commit f48a4b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions data_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ def _render(self):
for id, node in self.data.nodes.items():
if id.startswith('!'):
id = id.replace('!', '')
if len(id) != 8: # 8 hex chars required, if not, we abandon it
continue
nodes[id] = node

self.save_file("nodes.json", self.data.nodes)
Expand Down
6 changes: 4 additions & 2 deletions memory_data_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ def load(self):
for id, node in nodes.items():
if id.startswith('!'):
id = id.replace('!', '')
if len(id) != 8: # 8 hex chars required, if not, we abandon it
continue
if node['active'] is None:
node['active'] = False
if 'last_seen' not in node:
Expand All @@ -88,7 +90,7 @@ def load(self):
print(f"Overriding node {id}")
node = self.nodes[id]
if 'position' in node_override:
print(f"Overriding node position")
print("Overriding node position")
node['position'] = node_override['position']
self.nodes[id] = node
print(f"Loaded {len(nodes_overrides.keys())} nodes overrides from file ({self.config['paths']['data']}/nodes-overrides.json)")
Expand Down Expand Up @@ -325,7 +327,7 @@ def recursive_graph_node(node_id, start_id="", level=0) -> dict|None:
return node # Return the node if it has already been visited

if self.config['debug']:
print(f"%s - %s" % (" " * level, node_id))
print("%s - %s" % (" " * level, node_id))

visited.add(node_id) # Mark the node as visited

Expand Down

0 comments on commit f48a4b4

Please sign in to comment.