I have a few questions regarindg your code:
1. The code should be wrapped in a filter for acf/pre_save_post
2. This is a filter for the acf_form function
3. Are you using the acf_form function?
4. If so, what $options are you using in the acf_form function?
5. Have you debugged your code?
6. There is an issue with your code: $_POST['field_52e6afd36f4bc'] should be $_POST['fields']['field_52e6afd36f4bc']
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users