Iv antibiotics ...safe?

Ashleigh
I'm 20 weeks pregnant and on my second kidney infection in 2 weeks. The meds they prescribe to me I'm allergic to so the doctors said the only other way to treat it is through iv antibiotics. Has anyone else had to do this while pregnant? Is it safe?