The reason is because $post_id does not have a value there. Like I said, I don’t know how to get the value given the code you’ve posted. This is specific to the framework you are using. I am not familiar with the framework an you will need to ask the creators of that framework how to get the post ID of the current post in the loop where this code is used.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users