saltstack/salt — pull request #3537 by felskrone (2013-01-31 21:42:05+00:00)
Title: When going through the API, selected_target_option is always 'None'.

That brakes grains-based minion-discovery for the batch run when running through the API. The expr_form-variable is always set, so we can default to that safely instead of glob.

Tested with own client (derived from LocalClient()) and salt binary using batch mode and grains-based minion-discovery.