From the story here in The Chicago Tribune:
The Air Force lapse in the Devin P. Kelley case, which is now under review by the Pentagon's inspector general, made it possible for him to buy guns before his attack Sunday at a church in Sutherland Springs, Texas. Twenty-six people were killed, including multiple members of some families. About 20 other people were wounded. ...
Federal law prohibited him from buying or possessing firearms after his conviction. But because it was never added to the FBI's database for background checks, Kelley was able to buy his guns.
Air Force records show Kelley initially faced charges of domestic violence for seven alleged incidents in 2011 and 2012. Five were withdrawn as part of a plea agreement, including two involving Kelley pointing a loaded gun at his wife. He pleaded guilty to striking, choking and kicking his wife and hitting his stepson "with a force likely to produce death or grievous bodily harm."
He was sentenced in November 2012 to one year in confinement and reduction in rank to E-1, the lowest enlisted rank. He was given a bad conduct discharge, which was carried out in 2014. The officer overseeing the case was Robin Rand, then a three-star general and now the four-star commander of Air Force Global Strike Command in charge of the service's bomber force and nuclear missiles.