Skip to content

Commit

Permalink
Ensure refs can be updated by watcher of the same parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Apr 2, 2024
1 parent dae8fc4 commit ebf7e48
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions param/parameterized.py
Original file line number Diff line number Diff line change
Expand Up @@ -1471,12 +1471,13 @@ def __set__(self, obj, val):
item in a list).
"""
name = self.name
if obj is not None and self.allow_refs and obj._param__private.initialized and name not in obj._param__private.syncing:
if obj is not None and self.allow_refs and obj._param__private.initialized:
syncing = name in obj._param__private.syncing
ref, deps, val, is_async = obj.param._resolve_ref(self, val)
refs = obj._param__private.refs
if ref is not None:
self.owner.param._update_ref(name, ref)
elif name in refs:
elif name in refs and not syncing:
del refs[name]
if name in obj._param__private.async_refs:
obj._param__private.async_refs.pop(name).cancel()
Expand Down

0 comments on commit ebf7e48

Please sign in to comment.