Days after the Donald Trump won the U.S. presidential election, a citizen member spent a Hamilton city hall committee of adjustment meeting with a Trump hat on the table. Now, the city has approved a new code of conduct to make sure it doesn't happen again.

Rather than have someone be taken out to the woodshed through the mayor's office, it's much more appropriate that it be done through a policy. - Mayor Fred Eisenberger

City councillors approved the new rules for administrative boards and tribunals Wednesday, a move designed to avoid another Trump hat incident. Committee of adjustment is a quasi-judicial body and its members can't show political preferences during meetings.

"Rather than have someone be taken out to the woodshed through the mayor's office, it's much more appropriate that it be done through a policy," said Mayor Fred Eisenberger.

The rules are designed to "ensure integrity, transparency and courtesy," a city report says.

It includes that citizen members "shall act in an impartial, lawful and just manner" and can't appear to be "a representative on behalf of any party."

The slogan "Make America Great Again" was a fixture of the Trump campaign. Here, the future president Trump put on his signature "Make America Great Again" hat in Sacramento, Calif. (Jae C. Hong/Associated Press)

Much like the communication handbook for city advisory committees, it also says citizen members, except for committee chairs, can't talk to the media.

The change stems from a Nov. 17 incident when David Serwatuk, a committee of adjustment member, spent most of a meeting with a red "Make America Great Again" hat on the table.

When a presenter protested, Serwatuk removed it, declared a conflict of interest and left the room. He said that day someone had given it to him before the meeting and he didn't know what else to do with it. He later apologized.

But Mayor Fred Eisenberger said it pointed to the need for a code of conduct — and to make sure committee members are trained on it. So did Coun. Aidan Johnson of Ward 1, a lawyer who said the incident "ignores the sacred principle of political impartiality."

Serwatuk wasn't the only judicial figure in hot water over a Trump hat.

Bernd Zabel was a Hamilton judge who wore a Trump hat in court on Nov. 9. Four people filed complaints with the Ontario Judicial Council. On Dec. 21, 2016, Zabel stopped being assigned cases.

City council's general issues committee approved the code of conduct Wednesday. City council will vote to ratify it on March 8.

samantha.craggs@cbc.ca | @SamCraggsCBC