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

Fix issue serializing Spinner widgets with negative infinity value #3154

Merged
merged 1 commit into from
Jan 30, 2022
Merged
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
7 changes: 7 additions & 0 deletions panel/widgets/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,13 @@ def _update_model(self, events, msg, root, model, doc, comm):

return super()._update_model(events, msg, root, model, doc, comm)

def _process_param_change(self, msg):
# Workaround for -inf serialization errors
if 'value' in msg and msg['value'] == float('-inf'):
msg['value'] = None
msg['value_throttled'] = None
return super()._process_param_change(msg)

def _process_property_change(self, msg):
if config.throttled:
if "value" in msg:
Expand Down