Tracardi / tracardi

TRACARDI is a new HOME for your customer data. TRACARDI is an Composable API-first solution for any company that need inexpensive CDP to intergrate with.
https://www.tracardi.com
Other
501 stars 92 forks source link

Load profile By 0.7.2 plugin in Tracardi 0.8.2-rc2 #851

Closed MaratIR closed 5 months ago

MaratIR commented 9 months ago

HI! If the plugin does not find the profile, then everything works further, if the plugin finds the profile, then we get an error instead of the profile output. Although in the error itself we see that the profile is found.

1 validation error for Result value Input should be a valid dictionary [type=dict_type, input_value=Profile(id='64e81381-9364...res=None, points=0.0)))), input_type=Profile] For further information visit https://errors.pydantic.dev/2.3/v/dict_type. Check run method of `InjectProfileByField` Details: Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/tracardi/service/wf/domain/graph_invoker.py", line 332, in run_node result = await task File "/usr/local/lib/python3.10/site-packages/tracardi/service/wf/service/life_cycle/plugin.py", line 74, in execute return await node.object.run(**params) File "/usr/local/lib/python3.10/site-packages/tracardi/process_engine/action/v1/internal/inject_profile_by_field/plugin.py", line 58, in run return Result(port="profile", value=profile) File "/usr/local/lib/python3.10/site-packages/pydantic/main.py", line 165, in __init__ __pydantic_self__.__pydantic_validator__.validate_python(data, self_instance=__pydantic_self__) pydantic_core._pydantic_core.ValidationError: 1 validation error for Result value Input should be a valid dictionary [type=dict_type, input_value=Profile(id='64e81381-9364...res=None, points=0.0)))), input_type=Profile] For further information visit https://errors.pydantic.dev/2.3/v/dict_type

image

atompie commented 5 months ago

Now webhooks can map profile_id form the payload so no need to load profile by id.