Updated the 'get_data' function to include a fallback if now row exists for the post