Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes set_props to merge instead of overwriting props #3182

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion dash/long_callback/managers/diskcache_manager.py
Original file line number Diff line number Diff line change
@@ -179,7 +179,15 @@ def _set_progress(progress_value):
maybe_progress = [_set_progress] if progress else []

def _set_props(_id, props):
cache.set(f"{result_key}-set_props", {_id: props})
set_props_key = f"{result_key}-set_props"
existing_props = cache.get(set_props_key, {})

if _id in existing_props:
existing_props[_id].update(props) # Merge instead of overwrite
else:
existing_props[_id] = props # First-time update

cache.set(set_props_key, existing_props)

ctx = copy_context()