There is no need to charter a sleigh pulled by reindeer for your air travel to holiday destinations after all. American Airlines and its pilots have worked out a deal to staff cockpits in late December after a scheduling snafu threatened to cancel thousands of flights.

Because of what the airline is calling "a processing error" in its scheduling system, American mistakenly allowed many more pilots to take time off over the holidays than it should have.

Capt. Dennis Tajer, who serves as spokesman for the Allied Pilots Association, told NPR earlier this week that many of his fellow pilots "went to their sons, daughters, husbands and wives and said, 'Guess what? I'm off for Christmas! First time in 10 years!' "

But it turned out to be too good to be true, and Tajer said more than 15,000 flights between Dec. 17 and Dec. 31 were without a captain, first officer or both assigned to fly the plane. He said the scheduling mess-up threatened to cancel many of the flights.

The airline tried to cover the scheduling error by staffing flights with reserve pilots and offering some pilots premium pay to work. But the union filed a grievance saying the airline's efforts to restrict premium pay and trip trading for December flights violated terms of the pilots' contract.

The timing of the snafu couldn't have been worse, said transportation professor Joe Schwieterman of Chicago's DePaul University. "You look at the holiday season and [full flights] and you throw this kind of problem into the mix and no doubt, travelers get nervous," he said. "Many dread the crowds already without this lingering uncertainty."

The world's largest airline had a lot on the line, and not just because of the possibility of ruining holiday travel plans for thousands of occasional customers.

"American has a huge business traveler base that they need to keep happy," said Schwieterman, adding that he expected the airline to "open the wallet to fix this the best they can."

American apparently did just that. After a meeting Friday between union leadership and American's senior management, they reached "an agreement in principle addressing our respective needs, and we have withdrawn our grievance," the Allied Pilots Association said in a statement.

American Airlines thanked its pilots "who are doing their part to cover the holiday schedule and beyond."

Copyright 2017 NPR. To see more, visit http://www.npr.org/.