-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ActionNetwork.update_person() does not update the person #706
Comments
I think the json for PUT needs to go into the data parameter of the request. Right now it's going in the json parameter
|
Thanks for reporting this, @Maggiedp - we're trying to get some eyes on it within the contributor community. Feel free to put in a PR for a fix yourself, too, if you want! |
Chiming in to report that I was just told by support that the "right" way to update a record is to use the same "helper" endpoint we're already using in In my investigation, it did seem that it was possible to update some data with a PUT request to the record-specific endpoint. Specifically, I was able to update the value of a custom field (that already had a value on the record) this way. And, interestingly, I was able to do that without nesting I'm not 100% sure what the best approach for this connector is. Maybe we just need to get rid of |
UPDATE: I learned that you can use PUT on the record-specific endpoint to make changes to native and custom fields, but that the POST request to the generic ("helper") endpoint is required for anything to do with tags. |
Thanks for doing this research, @ydamit! I think adopting |
Can we mark this issue as closed? |
Yup, good catch |
When I run update_person(), it returns the person but does not actually update the value for that person.
To Reproduce
person_update['family_name'] returns 'Charles' and person_update['custom_fields']['2022Letter'] returns a keyerror because 2022Letter was not added to the custom fields. It does successfully return the json for the correct person, it just doesn't update the person.
Your Environment
Additional Context
I'm using the lower level function api.get_request() with the Action Network connector and it's working fine.
Priority
I think this is a high priority, since it's a bug that makes this function not work but I'm not sure how popular this function is. I'm working on workarounds that don't use parsons for updating people in AN.
The text was updated successfully, but these errors were encountered: