diff --git a/src/azure-cli-core/azure/cli/core/commands/__init__.py b/src/azure-cli-core/azure/cli/core/commands/__init__.py index 57d3cd475cb..e4d34bba500 100644 --- a/src/azure-cli-core/azure/cli/core/commands/__init__.py +++ b/src/azure-cli-core/azure/cli/core/commands/__init__.py @@ -700,15 +700,15 @@ def _run_job(self, expanded_arg, cmd_copy): elif cmd_copy.no_wait_param and getattr(expanded_arg, cmd_copy.no_wait_param, False): result = None - transform_op = cmd_copy.command_kwargs.get('transform', None) - if transform_op: - result = transform_op(result) - if _is_poller(result): result = LongRunningOperation(cmd_copy.cli_ctx, 'Starting {}'.format(cmd_copy.name))(result) elif _is_paged(result): result = list(result) + transform_op = cmd_copy.command_kwargs.get('transform', None) + if transform_op: + result = transform_op(result) + result = todict(result, AzCliCommandInvoker.remove_additional_prop_layer) event_data = {'result': result} cmd_copy.cli_ctx.raise_event(EVENT_INVOKER_TRANSFORM_RESULT, event_data=event_data)