Syntax for Data Explorer params in Automation

I can reproduce the issue as well.

In your example, let’s say you want to check the moderators and admins groups, you are supposed to have:

key: group_name
value: moderators,admins


Technical stuff to help, don’t mind me. :smile:
I tried to understand looking at the code, and I think there is an issue here:

The params are transformed before run_query is called.
Let’s say you have this original value:
[{"key":"group_names","value":"admins,moderators"}]
The transformed value will be:
{{"key"=>"group_names", "value"=>"admins,moderators"}=>nil}

However, cast_params seems to expect {"group_names"=>"admins,moderators"}

I tried to test this naive change, and the params worked.

def self.params_to_hash(query_params)
  params = JSON.parse(query_params)
  params_hash = {}

  params.each do |param|
    key = param["key"]
    value = param["value"]
    params_hash[key] = value
  end

  params_hash
end
7 Likes