Use get_admin_url() instead of get_edit_post_link()

get_edit_post_link() is only intended to be used in the admin panels by a logged in user, so it returns null when triggered by a logged out user and the resulting link will be empty.