Skip to content

Commit

Permalink
fix(proxy): make ProxyManager.load return _id_remap
Browse files Browse the repository at this point in the history
  • Loading branch information
bourdaisj authored and jourdain committed May 14, 2024
1 parent 15985e8 commit 175d92d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ def save(self, file_output=None):
"""Export state (definition+data) into a file"""

def load(self, file_input=None, file_content=None):
"""Load previously exported state from a file"""
"""
Load previously exported state from a file.
Return the proxy id remap which is a dict with proxy id's found in the provided state as keys and the corresponding freshly created proxy id's as values.
"""
```

__Commit / Reset__
Expand Down
2 changes: 2 additions & 0 deletions trame_simput/core/proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,8 @@ def load(self, file_input=None, file_content=None):
)
self._emit("created", ids=_new_ids)

return _id_remap

# -------------------------------------------------------------------------
# Commit / Reset
# -------------------------------------------------------------------------
Expand Down

0 comments on commit 175d92d

Please sign in to comment.