Skip to content

Commit ad73c29

Browse files
committed
reverse condition
1 parent a1e461f commit ad73c29

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

dash/_callback.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -469,14 +469,7 @@ def add_context(*args, **kwargs):
469469

470470
component_ids = collections.defaultdict(dict)
471471

472-
if not has_output:
473-
if output_value is not None:
474-
raise InvalidCallbackReturnValue(
475-
f"No output callback received return value: {output_value}"
476-
)
477-
output_value = []
478-
flat_output_values = []
479-
else:
472+
if has_output:
480473
if not multi:
481474
output_value, output_spec = [output_value], [output_spec]
482475
flat_output_values = output_value
@@ -504,6 +497,13 @@ def add_context(*args, **kwargs):
504497
id_str = stringify_id(speci["id"])
505498
prop = clean_property_name(speci["property"])
506499
component_ids[id_str][prop] = vali
500+
else:
501+
if output_value is not None:
502+
raise InvalidCallbackReturnValue(
503+
f"No output callback received return value: {output_value}"
504+
)
505+
output_value = []
506+
flat_output_values = []
507507

508508
if not long:
509509
side_update = dict(callback_ctx.updated_props)

0 commit comments

Comments
 (0)