The city attorney shall act as attorney for the commission provided for in this chapter in all trials and other legal transactions of the commission.