darabos commited on
Commit
7516093
·
1 Parent(s): fbf786e

Make unique node IDs.

Browse files
lynxkite-core/src/lynxkite/core/workspace.py CHANGED
@@ -204,8 +204,9 @@ class Workspace(BaseConfig):
204
 
205
  def add_node(self, func):
206
  """For convenience in e.g. tests."""
 
207
  node = WorkspaceNode(
208
- id=func.__name__,
209
  type=func.__op__.type,
210
  data=WorkspaceNodeData(
211
  title=func.__op__.name,
 
204
 
205
  def add_node(self, func):
206
  """For convenience in e.g. tests."""
207
+ random_string = os.urandom(4).hex()
208
  node = WorkspaceNode(
209
+ id=f"{func.__op__.name} {random_string}",
210
  type=func.__op__.type,
211
  data=WorkspaceNodeData(
212
  title=func.__op__.name,