Bristol City defender Lewin Nyatanga has undergone an operation on a hernia problem which has kept him out of the side for the past four games.