hide api link in candidates/index when election id empty