American Airlines said Friday it does not expect to cancel any flights in December because of a pilot shortage, ending a 48-hour saga that had some passengers wondering if they should switch airlines for holiday travel.

For at least a week, according to the airline’s pilot union, American had been dealing with a technical problem with its pilot scheduling system. The airline’s computers had erroneously approved time off for just about any pilot who wanted it — regardless of whether the pilot deserved it. American kept quiet, but Bloomberg reported it on Wednesday, and soon media worldwide chased the story, making passengers nervous.

The union, the Allied Pilots Association, said Wednesday that American was at least one pilot short for as many as 15,000 flights in the second half of December. American disputed the number, but agreed it had a problem, and began offering pilots 150 percent of their usual pay to work on days on which they were mistakenly given time off.

American management and the pilot union have not had the best relationship, and for a couple of days they traded barbs about the severity of the issue. American maintained it would find a way to fix it, while a spokesman for the union told reporters the airline was underplaying the extent of the problem. The union also blasted American for not collaborating with pilot leaders on a solution.

All that is moot now. American said in a statement the union and management have devised a plan to ensure no flights will be canceled. It did not immediately share details of the deal.

“We are pleased to report that together, American and the Allied Pilots Association have put that worry to rest to make sure our flights will operate as scheduled,” American said. “By working together, we can assure customers that among the many stresses of the season, worrying about a canceled flight won’t be one of them.”

In a statement, the union said: “With this agreement in principle, we anticipate that American Airlines will be able to maintain a full December schedule as planned for its passengers.”

Photo Credit: An American Airlines pilot works in the controls on an aircraft parked in Miami. The airline has solved its staffing issue for December. Brandon Wade / American Airlines