Uti and sex..?

Is it okay to have sex while you have an urinary tractor infection..?