Skip to content

Commit 175d92d

Browse files
bourdaisjjourdain
authored andcommitted
fix(proxy): make ProxyManager.load return _id_remap
1 parent 15985e8 commit 175d92d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

docs/api.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ def save(self, file_output=None):
6565
"""Export state (definition+data) into a file"""
6666

6767
def load(self, file_input=None, file_content=None):
68-
"""Load previously exported state from a file"""
68+
"""
69+
Load previously exported state from a file.
70+
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.
71+
"""
6972
```
7073

7174
__Commit / Reset__

trame_simput/core/proxy.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,8 @@ def load(self, file_input=None, file_content=None):
857857
)
858858
self._emit("created", ids=_new_ids)
859859

860+
return _id_remap
861+
860862
# -------------------------------------------------------------------------
861863
# Commit / Reset
862864
# -------------------------------------------------------------------------

0 commit comments

Comments
 (0)