Should a person have surgery after an attack of diverticulitis?

Sometimes. It depends on if this is your first episode of diverticulitis and successfully treated with antibiotics, then no surgery indicated. If you had complicated diverticulitis with significant abscess or rupture, then surgery is more likely indicated. If you have had repeated episodes of diverticulitis requiring medical treatment, more than 2 to 3 episodes, then surgery may be indicated.
Sometimes. Surgery is reserved for people who have a life-threatening infection from an acute episode of diverticulitis or those that develop serious complications from diverticulitis, such as an abscess, fistula, or stricture. Thankfully, this is the exception rather than the rule. Furthermore, when necessary, this operation may often be performed via minimally invasive surgery.