For each such primary election district, the election officers and clerks shall be divided as equally as possible between the two principal parties, except that, in the event that there is a contest in only one party in a primary election district, all of the primary election officers and clerks for that district shall be persons whose party affiliation, as shown upon his original permanent regist