mixpanel / mixpanel-utils

Other
87 stars 63 forks source link

fix: Amended input to be correct structure #55

Open ardens-jw opened 1 year ago

ardens-jw commented 1 year ago

Currently - when providing a list of profile ids for operations, I received the following error:

    params["$distinct_id"] = profile["$distinct_id"]
                             ~~~~~~~^^^^^^^^^^^^^^^^
TypeError: 'int' object is not subscriptable

Cause is because the _prep_params_for_profile method is expecting the profile argument to be "A Mixpanel People profile dict" - as taken from the documentation.

I've provided my current fix in this PR.