The fact that you had taken treatment for 8 months should relieve you of apprehensions about fertility
per se will NOT affect fertility.
But if there was coexisting urogenital (affecting fallopian tubes, kidneys etc) tuberculosis it can have an effect on fertility.
Why was treatment for 8 months advised ? Usually a 6 month short course is advised for pulmonary tuberculosis . I presume that was the first treatment.
If you had regular treatment with adequate dosage drugs for 8 months , leave your worries behind.
If you face any difficult in conceiving you may have to undergo hysterosalpingogram , endometrial curettage and culture . A gynaecologist would be in a better position to advise regarding the same