Skip to content
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
9 changes: 6 additions & 3 deletions dash/_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,7 @@ def _update_background_callback(
kwargs,
background,
multi,
output_spec,
cache_key=None,
job_id=None,
):
Expand Down Expand Up @@ -663,6 +664,7 @@ def _update_background_callback(
error_handler,
callback_ctx,
multi,
output_spec,
cache_key=cache_key,
job_id=job_id,
)
Expand All @@ -675,6 +677,7 @@ def _handle_rest_background_callback(
error_handler,
callback_ctx,
multi,
output_spec,
has_update=False,
cache_key=None,
job_id=None,
Expand All @@ -693,7 +696,7 @@ def _handle_rest_background_callback(
if error_handler:
output_value = error_handler(exc)

if output_value is None:
if output_value is None and output_spec:
output_value = NoUpdate()
# set_props from the error handler uses the original ctx
# instead of manager.get_updated_props since it runs in the
Expand Down Expand Up @@ -927,7 +930,7 @@ def add_context(*args, **kwargs):
)

output_value, has_update, skip = _update_background_callback(
error_handler, callback_ctx, response, kwargs, background, multi
error_handler, callback_ctx, response, kwargs, background, multi, output_spec
)
if skip:
return output_value
Expand Down Expand Up @@ -998,7 +1001,7 @@ async def async_add_context(*args, **kwargs):
callback_ctx,
)
output_value, has_update, skip = _update_background_callback(
error_handler, callback_ctx, response, kwargs, background, multi
error_handler, callback_ctx, response, kwargs, background, multi, output_spec
)
if skip:
return output_value
Expand Down
Loading