Merge pull request #36425 from whiteinge/salt-api-dict-payload

Check for dictionary explicitly since we're accessing it as one
This commit is contained in:
Mike Place 2016-09-20 15:41:40 +09:00 committed by GitHub
commit 155bd14b5e

View file

@ -863,7 +863,7 @@ def lowdata_fmt():
# if the data was sent as urlencoded, we need to make it a list.
# this is a very forgiving implementation as different clients set different
# headers for form encoded data (including charset or something similar)
if data and not isinstance(data, list):
if data and isinstance(data, collections.Mapping):
# Make the 'arg' param a list if not already
if 'arg' in data and not isinstance(data['arg'], list):
data['arg'] = [data['arg']]