Dakota the dog’s life spared under court deal